# Event


<style>
  span[class^="pill-"] {
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.6em;
    vertical-align: middle;
    margin-right: 12px;
    font-family: sans-serif;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
  }
  span.pill-GET { background-color: #61affe; }
  span.pill-POST { background-color: #49cc90; }
  span.pill-PUT { background-color: #fca130; }
  span.pill-DELETE { background-color: #f93e3e; }
  span.pill-PATCH { background-color: #50e3c2; }
  span[class^="pill-"]:after {
    content: attr(data-label);
    font-size: 0.9rem;
  }
</style>

Events form the basis of the Exoscale audit-trail, a mechanism to query past events performing mutations on resources which happened on an organization.

[Read more](https://community.exoscale.com/platform/audit-trail/)


---

## Other Operations

## <span data-label="GET" class="pill-GET"></span>list-events

List Events

```
GET /event
```

Retrieve Mutation Events for a given date range. Defaults to retrieving Events for the past 24 hours.
         Both a `from` and `to` arguments can be specified to filter Events over a specific period.
         Events will be the the most descriptive possible but not all fields are mandatory

### Query parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `from` | `query` | no | ISO 8601 date-time. |
| `to` | `query` | no | ISO 8601 date-time. |

### Responses

Status: `200` - 200

Content-Type: `application/json`


<details>
<summary>Example output</summary>

```json
[
  {
    "body-params": {},
    "elapsed-ms": 0,
    "get-params": {},
    "handler": "string",
    "iam-api-key": {
      "key": "string",
      "name": "string",
      "role-id": "string"
    },
    "iam-role": {
      "assume-role-policy": {
        "rules": [
          {
            "action": null,
            "expression": null,
            "resources": null
          }
        ]
      },
      "description": "string",
      "editable": true,
      "id": "string",
      "labels": {},
      "max-session-ttl": 0,
      "name": "string",
      "permissions": [
        "bypass-governance-retention"
      ],
      "policy": {
        "default-service-strategy": "allow",
        "services": {}
      }
    },
    "iam-user": {
      "email": "string",
      "id": "string",
      "pending": true,
      "role": {
        "assume-role-policy": {
          "rules": [
            null
          ]
        },
        "description": "string",
        "editable": true,
        "id": "string",
        "labels": {},
        "max-session-ttl": 0,
        "name": "string",
        "permissions": [
          "bypass-governance-retention"
        ],
        "policy": {
          "default-service-strategy": "allow",
          "services": {}
        }
      },
      "sso": true,
      "two-factor-authentication": true
    },
    "message": "string",
    "path-params": {},
    "request-id": "string",
    "source-ip": "string",
    "status": 0,
    "timestamp": "2024-01-01T12:00:00Z",
    "uri": "string",
    "zone": "string"
  }
]
```
</details>


SDK reference for `list-events`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ListEvents) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.list_events) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#listEvents(java.lang.String,java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api list-events`


