Skip to main content

List audit logs

GET /v1/audit-logs

Get a paginated list of audit logs.

Token scope required: audit-logs:list

Request

Query Parameters
  • includeCounts boolean

    If true, return count of total records and current page start and count in metadata

  • cursor string

    Cursor value at which to start the results, provided in nextCursor or prevCursor of a prior request

    Example: bmV4dA.eyJsb2dzLmNyZQ5iIiwiX3ZhbHVlIjo9In19
  • pageSize integer

    Possible values: <= 500

    Default value: 25

    Number of records to return in each page

  • filter.targetID string

    Return only audit logs for the specified target

  • filter.targetType string

    Possible values: [apiKey, host, network, role, user, ca, oidcProvider]

    Return only audit logs matching the specified target type

Responses

Successful operation

Schema
  • data object[]
  • Array [
  • id string
  • organizationID string
  • timestamp date-time
  • actor object

    The entity performing the action which caused a change.

  • oneOf
  • type string

    Possible values: [apiKey]

    An API key which used to perform the action.

  • id string
  • name string nullable
  • target object

    The entity being acted upon.

  • id string
  • type string

    Possible values: [apiKey, ca, host, network, oidcProvider, role, user]

  • event object

    Information about what happened, including relevant values before & after the change.

  • type string

    Possible values: [CREATED, UPDATED, DELETED, DELETED_TOTP, CREATED_TOTP, SUCCEEDED_AUTH, FAILED_AUTH, ENROLLED, RENEWED, CREATED_ENROLL_CODE, SET_NETWORK_CA, BLOCKED_HOST, UNBLOCKED_HOST, SET_OVERRIDES]

    The type of event that occurred.

  • before object nullable

    The state of the target before the change was made. The shape depends on the target and event type. Can also be a string or null (e.g. target was created).

  • after object nullable

    The state of the target before the change was made. The shape depends on the target and event type. Can also be a string or null (e.g. target was deleted).

  • ]
  • metadata object
  • totalCount integer

    The total number of resources existing in the account

  • hasNextPage boolean

    Is there a page of data that can be fetched using the nextCursor?

  • hasPrevPage boolean

    Is there a page of data that can be fetched using the prevCursor?

  • nextCursor string

    An opaque string that can be used to fetch the next page of results. Not provided if result set is empty.

  • prevCursor string

    An opaque string that can be used to fetch the next page of results. Not provided if result set is empty.

  • page object
  • count integer required

    The number of results returned in the response.

  • start integer required

    The zero-based index of the first result within the overall list. For example, the first page will have a start of 0. If 25 results are fetched, and the nextCursor used to fetch a new page of results, the second request's start will be 25.

  • Loading...