Skip to main content
POST
/
api
/
audit-logs
/
export
Create Export Job
curl --request POST \
  --url https://anaconda.com/api/audit-logs/export \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from_date": "<timestamp>",
  "q": [],
  "search_operator": "or",
  "to_date": "<timestamp>"
}
'
{}

Authorizations

Authorization
string
header
required

Authenticate requests using a bearer token.

Supported token types:

  • Access Token — short-lived token obtained from the authentication service
  • JWT Token — JSON Web Token containing encoded credentials

Header format

  • Authorization: Bearer <your_token>

Headers

X-Org-Name
string | null

Name of the organization to scope the request to. This header is required in multi-tenant deployments.

Organization name used to resolve the tenant context.

X-API-Version
string
default:v1

API version identifier (for example, v1 or v2). Defaults to v1 when not provided.

API version to target for this request.

Body

application/json

Request body for creating a new export job that filters audit logs and writes them in JSON Lines format.

from_date
string<date-time> | null

Lower bound (inclusive) for filtering audit logs by occurred_at. Only events with occurred_at >= from_date are exported.

Example:

"<timestamp>"

q
string[]

Search filters in the format column_name:search_string1,search_string2.

Multiple values for a single column are separated by commas. To combine multiple q entries, use search_operator.

search_operator
string
default:or

Logical operator used to combine multiple q filters:

  • or — export logs that match any search condition
  • and — export logs that match all search conditions
to_date
string<date-time> | null

Upper bound (inclusive) for filtering audit logs by occurred_at. Only events with occurred_at <= to_date are exported.

Example:

"<timestamp>"

Response

Request succeeded and an export job identifier is returned.

{key}
string<uuid>