Audit logs
The organization's record of who changed what, one entry per committed write to this API.
Introduction
The audit log is the organization's record of who changed what. Only writes are recorded, and each committed write records one entry with the credential that made it, the environment it was scoped to, and the fields it changed. Only a write that changed something records an entry.
actor is the credential as it was named when the write ran, so a key renamed or deleted since still reads the way it did then. source is console for an org-scoped token and api for an API key. detail holds the change itself, each field as {"from": …, "to": …}, and a secret write records that its value changed without the value.
A denied entry is a secret write refused with 403 because the organization's tenancy is not active, with the refusal under refusal. It is written after the refusal is answered, so it is best effort, and it stops once the organization's deletion or purge has begun.
Entries are kept until the organization is purged, and deleting an app keeps its entries.
List audit logs
Returns the organization's audit log, newest first. Each committed write records one entry, attributed to the credential that made it: an org-scoped token is the console and an API key is every other client. A write that changes nothing records no entry. A secret write refused with 403 because the organization's tenancy is not active records an entry with status denied on a best-effort basis: it is written after the refusal is answered, and is not written once the organization's deletion or purge has begun. Invocations, task polls and reads record nothing. Entries are kept until the organization is purged; deleting an app keeps its entries. A cursor is valid only with the q, source and status it was issued under, ignoring the case of q.
q matches action, actor.name and each target id as a literal substring, ignoring case. A cursor is valid only with the q, source and status it was issued under, so changing any of them means starting again.
Request
q
stringmin: 1max: 100Case-insensitive literal substring match against
action,actor.nameand each targetid. An entry matching any of them is returned.
source
stringconsolefor an org-scoped token,apifor an API key.Allowed values2 values
status
stringsuccesswhen the write committed,deniedwhen a secret write was refused with403because the organization's tenancy is not active.Allowed values2 values
limit
integerint32min: 1max: 100default: 20Maximum number of items to return.
cursor
stringOpaque pagination cursor returned by a previous call, as
nextCursoror, on the operations that offer one,prevCursor.
Response
nextCursor
stringnullableCursor for the next page. Null when there are no more items.
data
object[]requiredArray items11 properties each
id
stringrequiredOpaque entry identifier.
occurredAt
string (date-time)requireddate-timeWhen the write ran.
action
stringrequiredPossible values31 values
status
stringrequiredsuccesswhen the write committed,deniedwhen a secret write was refused with403because the organization's tenancy is not active.Possible values2 values
actor
objectrequiredThe credential that made the write, as it was named at write time.
source
stringrequiredconsolefor an org-scoped token,apifor an API key.Possible values2 values
clientAddress
stringThe caller's IP address. Omitted when it is not known.
environment
objectThe environment the write was scoped to. Omitted when it had none.
targets
object[]requiredWhat the write acted on, by the identifier this API addresses it with: an app by
appId, a version by its number, a secret, variable, connector or environment by name, and a build or source upload by id.environment.defaults.updatenames none.
detail
objectrequiredThe non-secret change, under the names and in the shapes this API uses for the fields. A changed field is
{"from": …, "to": …}, with configuration fields underconfiguration. An app update that rolls a new version names it underversionNumber, even when no field changed. A build delete that cancels an in-flight build records the status it left the build in understatus, as a plain value. A secret write names the secret and records that its value changed, never the value. A denied entry carries the refusal underrefusal.
requestId
stringThe request id the API answered with. Omitted when it is not known.
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
500 | Unexpected server error |
503 | A required service is temporarily unavailable |