Skip to content
GitHubLog inStart free
cetra is not released yet. These docs describe the development version.

List the instance's audit records

GET
/api/v1/admin/audit-events
curl --request GET \
--url 'http://localhost:8080/api/v1/admin/audit-events?outcome=success&limit=100' \
--cookie cetra_session=<cetra_session>

Newest first. Instance admins only, with a session. Needs a licence that lists audit_log, or a cloud cell (403 plan_required otherwise). Org records are never listed here.

from

RFC 3339 timestamp or epoch milliseconds.

string

Records at or after this time (RFC 3339 or epoch milliseconds).

to

RFC 3339 timestamp or epoch milliseconds.

string

Records before this time (RFC 3339 or epoch milliseconds).

action
string

Comma-separated action names or group prefixes, at most 20 entries.

actor_id
string

The actor’s id: user, API key or token id. At most 64 characters.

target_id
string

The target’s id. At most 64 characters.

project_id
string format: uuid

Records of this project. The instance log has none, so it matches nothing there.

outcome

Whether the action succeeded.

string
Allowed values: success failure

success or failure.

limit

Page size of the audit list: 1 to 500, default 100 (plan P-1).

integer format: int32
default: 100 >= 1 <= 500

Maximum number of records (1–500, default 100).

cursor
string

Opaque cursor from a previous page.

One page of records, newest first.

Media typeapplication/json

One page of results. next_cursor is null when there is no next page.

object
data
required

Items in this page.

Array<object>

One audit record.

object
action
required

The action name, group.name.

string
actor
required

The actor of a record.

object
credential_id

The personal access token id, when a user acted through one.

string
email

The email, for a present user only.

string
id

The user, key, token id. Omitted when there is none.

string
kind
required

user, api_key, scim_token, control_plane, cli, system or anonymous.

string
name

The display name, when it resolves.

string
status
required

How a referenced user, key, project or provider resolves at read time (plan P-3).

string
Allowed values: present former_member deleted unresolved
via

session or pat for a user.

string
at
required

When the action happened.

string format: date-time
details
required

The action’s details: ids, names of changed fields, roles, counts. Never payload.

object
id
required

Record id.

string format: uuid
ip

The client IP, when recorded.

string
outcome
required

Whether the action succeeded.

string
Allowed values: success failure
project

The project the action belongs to.

object
email

The email, for a present user only.

string
id
required
string
kind
required

The target kind, as the record stores it.

string
name

The display name, when it resolves.

string
status
required

How a referenced user, key, project or provider resolves at read time (plan P-3).

string
Allowed values: present former_member deleted unresolved
target

The object the action changed.

object
email

The email, for a present user only.

string
id
required
string
kind
required

The target kind, as the record stores it.

string
name

The display name, when it resolves.

string
status
required

How a referenced user, key, project or provider resolves at read time (plan P-3).

string
Allowed values: present former_member deleted unresolved
user_agent

The client’s user agent, when recorded.

string
next_cursor
required

Opaque cursor for the next page, or null when this is the last page.

string | null

Example

{
"data": [
{
"actor": {
"status": "present"
},
"outcome": "success",
"project": {
"status": "present"
},
"target": {
"status": "present"
}
}
]
}

The request is malformed or a filter is invalid.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

No credentials, or the credentials are invalid.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

Too many requests.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}