Audit Logs
The Audit Log Service API allows customers to query and export their audit logs.
Audit logs track all actions performed on customer accounts, including resource creation, modification, and deletion. The API provides filtering, pagination, and export capabilities.
All endpoints require HTTP Basic authentication using UpCloud account credentials.
List audit logs
Returns a list of audit log rows according to the query parameters. Note that this endpoint is paginated by default and the list is limited in results.
Pagination Upcloud-Total-Count header is included in the response to indicate the total number of audit logs available with the current query parameters (excluding limit and offset). The total count can be used for a number of pagination strategies. limit and offset query parameters can be used to finally paginate the results.
query Parameters
Filter audit logs using a keyword such as account username, resource ID or IP address.
Search string
limitNumber of results to return (max 100, default 50)
Number of results to return
offsetOffset for retrieved results. (default 0)
Page for retrieved results. Note: 0 and 1 retrieve the same first page results. (default 0)
actionsList of actions to filter by
List of actions to filter by
originsList of origins to filter by
List of origins to filter by
resource_typesList of resource types to filter by
List of resource types to filter by
created_afterList audit logs created after the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z
List audit logs created after the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z
created_beforeList audit logs created before the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z
List audit logs created before the given timestamp (including the time of timestamp). Format: ISO timestamp eg. 2024-01-01T23:45:56Z
List audit logs › Responses
Successful response
List of audit log events
Export audit logs
Export all audit logs for the authenticated account as CSV or JSON (up to 180 day limit). Note: Use the format parameter to specify output format; only JSON schema is documented here.
query Parameters
formatExport format: 'csv' or 'json' (default: csv)
Export format
Export audit logs › Responses
File download. Returns JSON array of audit logs when format=json, or CSV when format=csv.
List of audit log events
Get event details
Returns details of a single audit log event by its cloud event ID.
path Parameters
cloudEventID^[0-9A-HJKMNP-TV-Z]{… · requiredCloud event ID (ULID format)
Cloud event ID (ULID format)
Get event details › Responses
Successful response
timeTimestamp of the event
auth_typeAuthentication type used (e.g., 'gui', 'api', 'basic_auth')
cloud_event_id^[0-9A-HJKMNP-TV-Z]{… · requiredCloud event ID in ULID format
upcloud_correlation_idUpCloud correlation ID for request tracing
resource_typeType of resource affected
actionAction performed
originOrigin of the request
account_usernameUsername that performed the action
resource_sub_typeSubtype of resource affected (e.g., 'session-api-token')
ip_addressIP address of the request origin (IPv4 or IPv6). May be masked for internal UpCloud services.
resource_idID of the affected resource. May be hidden for sensitive resources like auth and account.
Current state of the resource after the action (only present for create/update actions). Structure varies by resource_type.
Previous state of the resource before the action (only present for update/delete actions). Structure varies by resource_type.
Get filter options
Returns lists of available resource types, actions, and origins for filtering.
Get filter options › Responses
Successful response
resource_typesList of available resource types
actionsList of available actions
originsList of available origins