Skip to content

List audit events

Method

GET https://papi.afi.ai/api/v1/tenants/{tenant_id}/audit/events

Description

Get a list of audit events for the specified tenant. To list all available events, use 'limit' and 'page_token' as query parameters.

Path params
tenant_id string required

Tenant to list events for.

Query params
limit int32

Max number of items to return per page.

page_token string

Token from the previous list operation (next_page_token) to continue listing.

start_time date-time

Start time of the period for which one wants to get audit events. Date format should be specified in RFC3339 format.

end_time date-time

End time of the period for which one wants to get audit events. Date format should be specified in RFC3339 format.

curl -X GET \
    -H 'Authorization: {api-key}' \
    https://papi.afi.ai/api/v1/tenants/{tenant_id}/audit/events

Successful response (200) schema
object

AuditEventsPage is a result of audit events listing.

next_page_token string

Next page token to continue listing operation, i.e. to be set as next request page_token. Empty on last page.

items array of objects

Array of audit events.

object

AuditEvent describes an audit event.

id string

Event ID.

actor_email string

Email of the actor who triggered the event.

actor_name string

Name of the actor who triggered the event.

action string

Action performed by the actor.

subject string

Subject acted upon.

created_at date-time

Timestamp when this event was created.

details string

Details contain more information about event in JSON format. Exact format of Details field depends on audit event type and can potentially change in future product versions.

Response example
{
  "next_page_token": "string",
  "items": [
    {
      "id": "string",
      "actor_email": "string",
      "actor_name": "string",
      "action": "string",
      "subject": "string",
      "created_at": "2024-11-15T12:47:12.549228Z",
      "details": "string"
    }
  ]
}