Skip to main content
GET
/
api
/
audit-logs
Get Audit Logs
curl --request GET \
  --url https://anaconda.com/api/audit-logs \
  --header 'Authorization: Bearer <token>' \
  --header 'X-API-Version: <x-api-version>' \
  --header 'X-Org-Name: <x-org-name>'
{
  "items": [
    {
      "action_key": "<string>",
      "created_at": "<timestamp>",
      "id": "<uuid>",
      "message": "<string>",
      "org_id": "<uuid>",
      "action_verb": "<string>",
      "actor_email": "<string>",
      "actor_id": "<uuid>",
      "actor_type": "<string>",
      "meta": {},
      "occurred_at": "<timestamp>",
      "org_name": "<string>",
      "service_name": "<string>",
      "target_email": "<string>",
      "target_id": "<uuid>",
      "target_type": "<string>"
    }
  ],
  "total_count": 123
}

Authorizations

Authorization
string
header
required

Bearer token obtained by authenticating with your organization's service account credentials (client_id and client_secret).

See the Getting started page for the full authentication flow.

Headers

X-Org-Name
string
required

Your organization ID, found in your organization's URL: anaconda.com/app/organizations/<ORG_ID>/.

X-API-Version
string
default:v1
required

The API version to use. Set to v1.

Query Parameters

q
string[]

Filter audit logs by field values. Use the format column_name:value1,value2 to match entries where the column contains any of the specified values.

You can pass multiple q parameters to build complex filters. They are combined using the search_operator parameter.

search_operator
string
default:or

The logical operator used to combine multiple q filters.

Use or to return logs matching any filter. Use and to return only logs matching all filters.

sort
string
default:""

Sort the results by one or more columns. Use the format column_name for ascending order or -column_name for descending order.

For example, -occurred_at sorts by most recent first.

limit
integer
default:100

The maximum number of audit log entries to return per page.

Required range: 1 <= x <= 1000
offset
integer
default:0

The number of entries to skip before returning results. Use with limit to paginate through large result sets.

Required range: x >= 0
from_date
string<date-time> | null

Only return audit logs that occurred on or after this timestamp. Use ISO 8601 format with timezone.

Example:

"<timestamp>"

to_date
string<date-time> | null

Only return audit logs that occurred on or before this timestamp. Use ISO 8601 format with timezone.

Example:

"<timestamp>"

Response

Request succeeded and a paginated list of audit logs is returned.

Paginated response that wraps a list of audit log entries and the total number of matching records.

items
AuditLogResponse · object[]
required

Page of audit log entries returned for the current request.

total_count
integer
required

Total number of audit log entries matching the query, across all pages.