Skip to main content
POST
Export/purge audit logs

Authorizations

X-Qanapi-Authorization
string
header
required

A machine credential, qk_ followed by its secret. The first twelve characters are an indexed prefix; the rest is compared in constant time against a stored SHA-256 hash. A key reaches only the configurations it is linked to.

It may also be sent as Authorization: Bearer qk_..., which is recognised by the prefix.

Body

application/json

Accepts every filter the query endpoint accepts, plus these.

from
string<date-time>
to
string<date-time>
action
string
container_id
string
principal_id
string
principal_type
string
status
string
request_id
string
instance_id
string
format
enum<string>
default:jsonl
Available options:
jsonl,
csv
gzip
boolean
default:false
purge
boolean
default:false

Delete the exported records in the same transaction that read them, so nothing is purged that was not successfully exported. Requires audit:purge, and is itself recorded with the window it covered.

Response

The export stream.

The response is of type string.