List an organization's audit records
const url = 'http://localhost:8080/api/v1/orgs/example/audit-events?outcome=success&limit=100';const options = {method: 'GET', headers: {cookie: 'cetra_session=<cetra_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8080/api/v1/orgs/example/audit-events?outcome=success&limit=100' \ --cookie cetra_session=<cetra_session>Newest first. Admins and owners, with a session or a personal access token. Needs the audit_log feature: without it, 403 plan_required.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Org UUID or slug.
Query Parameters
Section titled “Query Parameters”RFC 3339 timestamp or epoch milliseconds.
Records at or after this time (RFC 3339 or epoch milliseconds).
RFC 3339 timestamp or epoch milliseconds.
Records before this time (RFC 3339 or epoch milliseconds).
Comma-separated action names or group prefixes, at most 20 entries.
The actor’s id: user, API key or token id. At most 64 characters.
The target’s id. At most 64 characters.
Records of this project. The instance log has none, so it matches nothing there.
Whether the action succeeded.
success or failure.
Page size of the audit list: 1 to 500, default 100 (plan P-1).
Maximum number of records (1–500, default 100).
Opaque cursor from a previous page.
Responses
Section titled “Responses”One page of records, newest first.
One page of results. next_cursor is null when there is no next page.
object
Items in this page.
One audit record.
object
The action name, group.name.
The actor of a record.
object
The personal access token id, when a user acted through one.
The email, for a present user only.
The user, key, token id. Omitted when there is none.
user, api_key, scim_token, control_plane, cli, system or anonymous.
The display name, when it resolves.
How a referenced user, key, project or provider resolves at read time (plan P-3).
session or pat for a user.
When the action happened.
The action’s details: ids, names of changed fields, roles, counts. Never payload.
object
Record id.
The client IP, when recorded.
Whether the action succeeded.
The project the action belongs to.
object
The email, for a present user only.
The target kind, as the record stores it.
The display name, when it resolves.
How a referenced user, key, project or provider resolves at read time (plan P-3).
The object the action changed.
object
The email, for a present user only.
The target kind, as the record stores it.
The display name, when it resolves.
How a referenced user, key, project or provider resolves at read time (plan P-3).
The client’s user agent, when recorded.
Opaque cursor for the next page, or null when this is the last page.
Example
{ "data": [ { "actor": { "status": "present" }, "outcome": "success", "project": { "status": "present" }, "target": { "status": "present" } } ]}The request is malformed or a filter is invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The resource does not exist.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}