Skip to content

List audit logs

GET/v1/audit-logs

Returns audit log entries, newest first. Only actions that change something (creating, updating, deleting, starting a VM and so on) are recorded. Reads are not logged. Each action is logged whether it succeeded or failed.

There are two views:

  • Your activity (default): every entry where you were the actor, across all workspaces.
  • Workspace trail: send the workspace_slug query parameter to get every member's entries for that workspace. You need the owner or admin role in the workspace.

This endpoint does not read the X-Workspace-Slug header. Use the workspace_slug query parameter to select a workspace.

Paging details are in a top-level meta object next to data. Entry fields use PascalCase names. Entries identify the acting user and the workspace by UID only (UserUID, WorkspaceUID); they do not include account or workspace details.

Authentication

Send your API key as Authorization: Bearer <token>.

Query parameters

workspace_slugstring

Slug of a workspace to return the shared audit trail for. Requires the owner or admin role in that workspace. Omit it to get your own activity.

actionstring

Filter by action. A value ending in .success or .failed matches exactly. Any other value matches every outcome of that action, so vm.create matches vm.create.success and vm.create.failed.

resource_typestring

Only return entries for this resource type, e.g. vm, snapshot, ssh_key, workspace_member.

resource_uidstring

Only return entries about the resource with this UID.

fromstring (date-time)

Only return entries created at or after this time (RFC 3339). An invalid value is ignored.

tostring (date-time)

Only return entries created at or before this time (RFC 3339). An invalid value is ignored.

pageinteger

Page number, starting at 1. Values below 1 return the first page.

Default 1min 1

page_sizeinteger

Entries per page. Defaults to 50. Values below 1 or above 200 fall back to 50.

Default 50min 1 · max 200

Response

200

The matching audit log entries.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Always ok.

dataarray of objectsRequired

The entries on this page, newest first.

Show item attributes
UIDstringRequired

Unique identifier of the entry.

UserUIDstringRequired

ID of the user who performed the action. Empty when there was none.

WorkspaceUIDstring

UID of the workspace the action happened in. Omitted for account-level actions and when the workspace has been deleted.

DescriptionstringRequired

Human-readable summary of what happened.

ActorstringRequired

Who acted. The username for console sessions, the API key's prefix for API key requests, or unauthenticated.

ActorTypestringRequired

How the actor authenticated.

One ofsessionapi_keyunauthenticated

StatusstringRequired

failed when the request returned a status of 400 or higher.

One ofsuccessfulfailed

ActionstringRequired

The action and its outcome, e.g. vm.create.success or ssh_key.delete.failed.

SeveritystringRequired

error for failed actions, otherwise info.

One ofinfowarningerror

ResourceNamestringRequired

Name of the affected resource, or its UID when the name could not be resolved. — when there is no resource.

ResourceUIDstringRequired

UID of the affected resource, when known.

CategorystringRequired

Broad category of the affected resource.

One ofcomputedatabasestoragesecuritynetworkingbillingworkspace

ResourceTypestringRequired

Type of the affected resource, e.g. vm, ssh_key, workspace_invitation.

IPAddressstringRequired

IP address the request came from.

UserAgentstringRequired

User agent of the request.

StatusCodeintegerRequired

HTTP status code the request returned.

Metadataobject | nullRequired

Extra details, such as the request's path parameters. Invitation tokens are redacted. null when there are none.

CreatedAtstring (date-time)Required

When the action happened.

metaobjectRequired

Paging details.

Show attributes
totalintegerRequired

Total number of matching entries.

pageintegerRequired

The page that was returned. Values below 1 (or non-numbers) are reported as 1.

page_sizeintegerRequired

The page size that was used. Values below 1 or above 200 (or non-numbers) are reported as 50.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403The workspace in workspace_slug does not exist or you are not a member (workspace not found or access denied), or your role cannot read its audit log (you do not have permission to view this workspace's audit log).

Errors use the standard error format.