API reference
Audit log
Read an organization's audit log.
GET
/ v1/ orgs/ :orgId/ auditOne page of the audit log, newest first. Filter by action (an action or a category), actor or target. The first page also returns retentionDays.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- audit:read
Path parameters
orgIdOrganization id (
org_…).
Query parameters
cursorstringUp to 4,096 characters.
actionstringMatches
^[a-z_]{1,32}(\.[a-z_]{1,32})?$.actorstring1–512 characters.
targetstringMatches
^[a-z_]{1,32}:[^\s]{1,512}$.limitintegerDefault
50. 1–100. Coerced from a string.
Errors
400Invalid cursor
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/audit' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Send it from this page with your session or a key.
Response 200
{
events: {
eventId: string
orgId: string
action: string
actor: {
type: "user" | "key" | "device" | "system"
id: string
label?: string
}
target: {
type: string
id: string
label?: string
}
metadata?: {
[key: string]: unknown
}
ip?: string
userAgent?: string
createdAt: number
}[]
cursor: null | string
retentionDays?: number
}GET
/ v1/ orgs/ :orgId/ audit/ exportDaily JSON Lines export of the audit log into one of the org's buckets (audit/<yyyy-mm-dd>.jsonl).
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- audit:read
Path parameters
orgIdOrganization id (
org_…).
Errors
404Organization not found
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/audit/export' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Send it from this page with your session or a key.
Response 200
{
export: {
bucketId: null | string
bucket: null | {
name: string
region: string
prefix: string
}
pendingDays: string[]
}
}PUT
/ v1/ orgs/ :orgId/ audit/ exportTurns the daily export on (bucketId: an active bucket of the org) or off (null). Owners and admins.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scopes
- audit:read, org:write
Path parameters
orgIdOrganization id (
org_…).
Request body
bucketIdstringrequiredor null1–64 characters.
Errors
400Choose an active bucket of this organization.404Organization not found
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/audit/export' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"bucketId": "<bucketId>"
}'Send it from this page with your session or a key.
Response 200
{
export: {
bucketId: null | string
bucket: null | {
name: string
region: string
prefix: string
}
pendingDays: string[]
}
}