v1

latestOpenAPI 3.0.12026-07-243686491.1 MB
Audit Log

Retrieve audit events filtered by search criteria

Required scope: audit-log:read

get/api/v1/auditlog/events

Query parameters

operatorIdinteger nullable

Limit results to a certain operator

Example:1
userIdstring nullable

Limit results to events caused by the user with this id. Supports comma-separated values for multiple IDs (e.g. '85,1').

Example:1
teamIdinteger nullable

Limit results to events caused in the context of the team with this id

Example:1
entityTypestring nullable

Only return events caused on this type of entity. Supports comma-separated values for multiple types (e.g. 'Team,ChargePoint').

Example:Team
entityIdstring nullable

Only return events on the entity with this ID (use in conjunction with entityType)

Example:1
actionstring nullable

Only return events that logged this action. Supports comma-separated values for multiple actions (e.g. 'CREATE,UPDATE').

Example:UPDATE
searchstring nullable

Free-text search in matching events

Example:update team SomeUserName
toDatestring date-time nullable

Only return events before this point in time (ISO 8601 format)

Example:2024-05-22T09:30:03Z
fromDatestring date-time nullable

Only return events after this point in time (ISO 8601 format)

Example:2024-05-22T09:50:03Z
perPageinteger nullable

The maximum number of results to return

Example:20
afterstring nullable

Cursor (event id) to retrieve results ordered after a certain event. Use this with a cursor from meta.after to retrieve the next page of results.

Example:MTcwNjYyMTcwMDEyM3xfTVF0eG8wQjVXRnNEN194ZC1uaw==
beforestring nullable

Cursor (event id) to retrieve results ordered before a certain event. Use this with a cursor from meta.before to retrieve the previous page of results. This parameter is ignored if afteris provided in the request as well.

Example:MTcwNjYyMTcwMDEyM3xfTVF0eG8wQjVXRnNEN194ZC1uaw==

Response

List of events that match the criteria

Example response

{
  "data": [
    {
      "id": "MTcwNjYyMTcwMDEyM3xfTVF0eG8wQjVXRnNEN194ZC1uaw==",
      "timestamp": "2024-02-22T18:01:26.242Z",
      "operatorId": 1,
      "teamId": 1,
      "action": "UPDATE",
      "entityId": "1",
      "entityType": "Team"
    }
  ],
  "meta": {
    "itemCount": 10,
    "perPage": 50,
    "after": "1290",
    "before": "1200"
  }
}