# Public Cloud › Compute › Instances › Observability API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Public Cloud product's sections: https://developers.eu.ovhcloud.com/reference/public-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 1 operation of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/public-cloud/compute/instances/observability/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/public-cloud/compute/instances/observability.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/compute/instances/observability.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/compute/instance/{instanceId}/events` — List instance events

## List instance events

`GET /v2/publicCloud/project/{projectId}/compute/instance/{instanceId}/events`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/compute/instances/observability/#getInstanceEvents

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:instance/event/get`

### List instance events

Returns the instance's event history. An audit log of the operations performed on it (create, reboot, resize, ...), most recent first. Each event carries a `kind` (the operation), a `type` (its outcome, for example `TASK_SUCCESS`), a human-readable `message`, and a `createdAt` timestamp. This is a read-only, synchronous call.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `instanceId` | path | string (uuid) | yes | Instance ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Event[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the event |
| `kind` | string | read-only | Nature of the event |
| `link` | string | read-only | Link to the event related resource |
| `message` | string | read-only | Description of what happened on the event |
| `type` | common.EventTypeEnum | read-only | Type of the event — one of `TARGET_SPEC_UPDATE`, `TASK_ERROR`, `TASK_START`, `TASK_SUCCESS` |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "kind": "string",
    "link": "string",
    "message": "string",
    "type": "TARGET_SPEC_UPDATE"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/compute/instance/{instanceId}/events" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/compute/instance/{instanceId}/events")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/compute/instance/{instanceId}/events");

print_r($result);
?>
```
