# 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

id string

ULID of event ([https://github.com/ulid/spec](https://github.com/ulid/spec))

Example: `"01F8WDQJR03M4VC6NTK49R83QW"`

type string

Must be exactly `"audit_log_event"`.

action\_name string

The actual action performed

Example: `"items.publish"`

actor object

The actor who performed the action

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

Show object format

type string

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

Example: `"user"`

id string

The ID of the actor

Example: `"3845289"`

name string

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

Example: `"mark@acme.com"`

role null, object

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

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

Show object format

name string

The name of the role

Example: `"Editor"`

id string

The ID of the role

Example: `"455281"`

environment object

The environment inside of which the action was performed

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

Show object format

id string

The ID of the environment

Example: `"main"`

primary boolean

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

request object

The actual request being performed

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

Show object format

path string

The full path of the request

Example: `"/items/37823421/publish"`

method string

The HTTP method of the request

Example: `"PUT"`

id string

The X-Request-ID header of the request

Example: `"894f9f6c-a693-4f93-a3fb-452454b41313"`

payload null, object

The full HTTP body of the request

Example: `{}`

response null, object

The actual response being returned by DatoCMS

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

Show object format

status integer

The HTTP status code of the response

Example: `"200"`

payload object

The full HTTP body of the response

Example: `"PUT"`

impersonated null, boolean

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

meta.occurred\_at date-time

The date of the event

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

## Available endpoints

-   [List Audit Log events](https://www.datocms.com/docs/content-management-api/resources/audit-log-event/query.md)

## Related content in "Content Management API"

- [Content Management API Overview](https://www.datocms.com/docs/content-management-api.md)

- [Using the JavaScript CMA client](https://www.datocms.com/docs/content-management-api/using-the-nodejs-clients.md)
- [API versioning](https://www.datocms.com/docs/content-management-api/api-versioning.md)

- [Authentication](https://www.datocms.com/docs/content-management-api/authentication.md)
- [Environments](https://www.datocms.com/docs/content-management-api/setting-the-environment.md)

- [Error codes & handling failures (CMA)](https://www.datocms.com/docs/content-management-api/errors.md)
- [Pagination](https://www.datocms.com/docs/content-management-api/pagination.md)

- [Asynchronous jobs](https://www.datocms.com/docs/content-management-api/async-jobs.md)
- [Technical Limits (CMA)](https://www.datocms.com/docs/content-management-api/technical-limits.md)

- [Record](https://www.datocms.com/docs/content-management-api/resources/item.md)
- [Scheduled publication](https://www.datocms.com/docs/content-management-api/resources/scheduled-publication.md)

- [Scheduled unpublishing](https://www.datocms.com/docs/content-management-api/resources/scheduled-unpublishing.md)
- [Upload](https://www.datocms.com/docs/content-management-api/resources/upload.md)

- [Site](https://www.datocms.com/docs/content-management-api/resources/site.md)
- [Model/Block model](https://www.datocms.com/docs/content-management-api/resources/item-type.md)

- [Field](https://www.datocms.com/docs/content-management-api/resources/field.md)
- [Fieldset](https://www.datocms.com/docs/content-management-api/resources/fieldset.md)

- [Record version](https://www.datocms.com/docs/content-management-api/resources/item-version.md)
- [Upload permission](https://www.datocms.com/docs/content-management-api/resources/upload-request.md)

- [Upload track](https://www.datocms.com/docs/content-management-api/resources/upload-track.md)
- [Manual tags](https://www.datocms.com/docs/content-management-api/resources/upload-tag.md)

- [Smart tags](https://www.datocms.com/docs/content-management-api/resources/upload-smart-tag.md)
- [Upload Collection](https://www.datocms.com/docs/content-management-api/resources/upload-collection.md)

- [Search Index](https://www.datocms.com/docs/content-management-api/resources/search-index.md)
- [Search result](https://www.datocms.com/docs/content-management-api/resources/search-result.md)

- [Search indexing activity](https://www.datocms.com/docs/content-management-api/resources/search-index-event.md)
- [Environment](https://www.datocms.com/docs/content-management-api/resources/environment.md)

- [Maintenance mode](https://www.datocms.com/docs/content-management-api/resources/maintenance-mode.md)
- [Menu Item](https://www.datocms.com/docs/content-management-api/resources/menu-item.md)

- [Schema Menu Item](https://www.datocms.com/docs/content-management-api/resources/schema-menu-item.md)
- [Uploads filter](https://www.datocms.com/docs/content-management-api/resources/upload-filter.md)

- [Model filter](https://www.datocms.com/docs/content-management-api/resources/item-type-filter.md)
- [Plugin](https://www.datocms.com/docs/content-management-api/resources/plugin.md)

- [Workflow](https://www.datocms.com/docs/content-management-api/resources/workflow.md)
- [Asynchronous job](https://www.datocms.com/docs/content-management-api/resources/job.md)

- [Job result](https://www.datocms.com/docs/content-management-api/resources/job-result.md)
- [Account](https://www.datocms.com/docs/content-management-api/resources/account.md)

- [Organization](https://www.datocms.com/docs/content-management-api/resources/organization.md)
- [Invitation](https://www.datocms.com/docs/content-management-api/resources/site-invitation.md)

- [Collaborator](https://www.datocms.com/docs/content-management-api/resources/user.md)
- [Role](https://www.datocms.com/docs/content-management-api/resources/role.md)

- [API token](https://www.datocms.com/docs/content-management-api/resources/access-token.md)
- [Webhook](https://www.datocms.com/docs/content-management-api/resources/webhook.md)

- [Webhook call](https://www.datocms.com/docs/content-management-api/resources/webhook-call.md)
- [Build trigger](https://www.datocms.com/docs/content-management-api/resources/build-trigger.md)

- [Deploy activity](https://www.datocms.com/docs/content-management-api/resources/build-event.md)
- [Subscription limit](https://www.datocms.com/docs/content-management-api/resources/subscription-limit.md)

- [Subscription feature](https://www.datocms.com/docs/content-management-api/resources/subscription-feature.md)
- [SSO Settings](https://www.datocms.com/docs/content-management-api/resources/sso-settings.md)

- [SSO User](https://www.datocms.com/docs/content-management-api/resources/sso-user.md)
- [SSO Group](https://www.datocms.com/docs/content-management-api/resources/sso-group.md)

- [White-label settings](https://www.datocms.com/docs/content-management-api/resources/white-label-settings.md)
- [Audit log event](https://www.datocms.com/docs/content-management-api/resources/audit-log-event.md)

- [List Audit Log events](https://www.datocms.com/docs/content-management-api/resources/audit-log-event/query.md)