/v1/audit-logsReturns 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_slugquery 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_slugstringSlug 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.
actionstringFilter 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_typestringOnly return entries for this resource type, e.g. vm, snapshot, ssh_key, workspace_member.
resource_uidstringOnly 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.
pageintegerPage number, starting at 1. Values below 1 return the first page.
Default 1min 1
page_sizeintegerEntries per page. Defaults to 50. Values below 1 or above 200 fall back to 50.
Default 50min 1 · max 200
Response
The matching audit log entries.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredAlways ok.
dataarray of objectsRequiredThe entries on this page, newest first.
Show item attributesHide item attributes
UIDstringRequiredUnique identifier of the entry.
UserUIDstringRequiredID of the user who performed the action. Empty when there was none.
WorkspaceUIDstringUID of the workspace the action happened in. Omitted for account-level actions and when the workspace has been deleted.
DescriptionstringRequiredHuman-readable summary of what happened.
ActorstringRequiredWho acted. The username for console sessions, the API key's prefix for API key requests, or unauthenticated.
ActorTypestringRequiredHow the actor authenticated.
One ofsessionapi_keyunauthenticated
StatusstringRequiredfailed when the request returned a status of 400 or higher.
One ofsuccessfulfailed
ActionstringRequiredThe action and its outcome, e.g. vm.create.success or ssh_key.delete.failed.
SeveritystringRequirederror for failed actions, otherwise info.
One ofinfowarningerror
ResourceNamestringRequiredName of the affected resource, or its UID when the name could not be resolved. — when there is no resource.
ResourceUIDstringRequiredUID of the affected resource, when known.
CategorystringRequiredBroad category of the affected resource.
One ofcomputedatabasestoragesecuritynetworkingbillingworkspace
ResourceTypestringRequiredType of the affected resource, e.g. vm, ssh_key, workspace_invitation.
IPAddressstringRequiredIP address the request came from.
UserAgentstringRequiredUser agent of the request.
StatusCodeintegerRequiredHTTP status code the request returned.
Metadataobject | nullRequiredExtra details, such as the request's path parameters. Invitation tokens are redacted. null when there are none.
CreatedAtstring (date-time)RequiredWhen the action happened.
metaobjectRequiredPaging details.
Show attributesHide attributes
totalintegerRequiredTotal number of matching entries.
pageintegerRequiredThe page that was returned. Values below 1 (or non-numbers) are reported as 1.
page_sizeintegerRequiredThe page size that was used. Values below 1 or above 200 (or non-numbers) are reported as 50.
Errors
| Status | Meaning |
|---|---|
401 | The API key is missing, invalid, expired or revoked. |
403 | The 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.