Logo
OpenScaler

List user audit events

GET
/v1/user-events

List activity events for the authenticated user. To navigate to the next/previous page of events, use the after / before cursor parameters.

Authorization

bearer_auth
AuthorizationBearer <token>

OAuth Authentication

OpenScaler API uses OAuth, a standard for secure authorization. To access the API, obtain a token via the OpenScaler Platform.

Use the access_token in the Authorization header for requests:

Authorization: Bearer <token>

Always keep your token secure and do not share it with anyone.

In: header

Query Parameters

from*string

Lower bound of the time window (ISO 8601). Inclusive.

Formatdate-time
to?string

Upper bound of the time window (ISO 8601). Defaults to now when omitted.

Formatdate-time
limit?integer

Maximum number of events to return (1–200). Defaults to 20.

Range1 <= value <= 200
project_id?string

Filter events to a specific project.

resource_id?string

Filter by resource ID (requires resource_type).

Formatuuid
resource_type?string

Filter by resource type (requires resource_id).

Value in

  • "vm"
  • "vpc"
  • "block_storage_volume"
  • "vm_backup"
  • "backup"
  • "ssh_key"
  • "k8s_cluster"
  • "load_balancer"
  • "elastic_server"
  • "user_template"
titles?string

Exact event title match. Accepts a comma-separated list or repeated query params. Examples: Computer created, Computer deleted.

levels?string

Exact level match. Accepts a comma-separated list or repeated query params. Allowed values: DEBUG, INFO, SUCCESS, WARNING, ERROR.

after?string

Opaque base64 cursor for the next page. Cannot be combined with before.

before?string

Opaque base64 cursor for the previous page. Cannot be combined with after.

Response Body

application/json

application/json

text/pain

application/json

application/json

curl -X GET "https://example.com/v1/user-events?from=2019-08-24T14%3A15%3A22Z"
{  "events": [    {      "event_id": "019dd518-7b37-7b33-99a7-85d78d7a3320",      "user_id": "7247ba6a-b17d-4c72-94f1-a36108aee56d",      "resource_id": "cc3ccab2-0ae2-11ef-9136-6a0922f6458b",      "resource_name": "my-example-computer",      "project_id": "default",      "time": "2024-04-15T14:54:31.486Z",      "level": "INFO",      "version": 1,      "title": "Computer created",      "data": {},      "triggered_by": "user"    }  ],  "pagination": {    "has_more": false,    "cursors": {      "before": "MTc0NDcyODg3MS40ODYsMDE5ZGQ1MTgtN2IzNy03YjMzLTk5YTctODVkNzhkN2EzMzIw",      "after": "MTc0NDcyODg3MS40ODYsMDE5ZGQ1MTgtN2IzNy03YjMzLTk5YTctODVkNzhkN2EzMzIw"    },    "count": 1  }}
{  "errors": [    {      "message": "'vcpus' field must be an integer",      "field": "resource_id"    }  ]}
"Access denied"
{  "errors": [    {      "message": "User not initialized (missing required fields in token), please init user by sending POST request to `/v1/init` then refresh your token\n"    }  ]}
{  "errors": [    {      "message": "VM with ID 23 not found"    }  ]}