Show examples in:
JavascriptHTTP
Content Management API > Audit log event

Audit log event

If the Audit log functionality is enabled in a project, logged events can be queried using SQL-like language and fetched in full detail so that they can be exported or analyzed.

Object payload

idstring
Example:"01F8WDQJR03M4VC6NTK49R83QW"
typestring

Must be exactly "audit_log_event".

action_namestring

The actual action performed

Example:"items.publish"
actorobject

The actor who performed the action

Example:{ type: "user", id: "3845289", name: "mark@acme.com" }
typestring

The type of actor (can be account, user, sso_user or access_token)

Example:"user"
idstring

The ID of the actor

Example:"3845289"
namestring

An human representation of the actor (name/email/username depending on the type of actor)

Example:"mark@acme.com"
rolenull, object

The role of the actor at the time the action was performed

Example:{ id: "455281", name: "Editor" }
namestring

The name of the role

Example:"Editor"
idstring

The ID of the role

Example:"455281"
environmentobject

The environment inside of which the action was performed

Example:{ id: "main", primary: true }
idstring

The ID of the environment

Example:"main"
primaryboolean

Whether the environment was the primary one at the time the action was performed

requestobject

The actual request being performed

Example:{ id: "894f9f6c-a693-4f93-a3fb-452454b41313", method: "PUT", path: "/items/37823421/publish", payload: {}, }
pathstring

The full path of the request

Example:"/items/37823421/publish"
methodstring

The HTTP method of the request

Example:"PUT"
idstring

The X-Request-ID header of the request

Example:"894f9f6c-a693-4f93-a3fb-452454b41313"
payloadnull, object

The full HTTP body of the request

Example:{}
responsenull, object

The actual response being returned by DatoCMS

Example:{ status: 200, payload: {} }
statusinteger

The HTTP status code of the response

Example:"200"
payloadobject

The full HTTP body of the response

Example:"PUT"
impersonatednull, boolean

Whether the action was performed during a debug (impersonation) session by DatoCMS staff

meta.occurred_atdate-time

The date of the event

Example:"2016-09-20T18:50:24.914Z"

Available endpoints