Audit Logs API

Retrieve audit logs for key user, team, and authentication events

The Audit Logs API (released with 5.25.0) allows access to audit logs that track key user management, team management, and user logging events.

The audit log includes:

  • Performing user

  • Affected user

  • Time of change

  • Value change for each event

Tabnine allows self-serve access via the Audit Logs API with a token.

Only users with Admin access can access the Audit Logs API.

You can use the same mapping from the Usage Metrics API between user_id to email and team_id to team name.

List audit log events

get
/api/v1/organization/audit-logs

Returns a paginated list of audit log events for the organization.

Supports filtering by time range, event type, actor, and resource, as well as offset-based pagination and CSV download.

Examples:

  • JSON with pagination: /api/v1/organization/audit-logs?limit=50&offset=0

  • CSV download: /api/v1/organization/audit-logs?format=csv

Authorizations
X-API-KeystringRequired
Query parameters
fromstring · date-timeOptional

Start of time range to filter events (inclusive), in ISO 8601 format. Example: 2025-01-01T00:00:00Z

tostring · date-timeOptional

End of time range to filter events (exclusive), in ISO 8601 format. Example: 2025-01-31T23:59:59Z

eventTypestringOptional

Filter by a specific event type.

Common values might include:

  • team_member.added
  • team_member.removed
  • team_member.updated
  • role.assigned
  • role.revoked
actorIdstringOptional

Filter by the unique ID of the actor who triggered the event.

actorEmailstring · emailOptional

Filter by the email address of the actor who triggered the event.

resourceTypestringOptional

Filter by the type of resource affected by the event. For example: team, user, role, organization.

resourceIdstringOptional

Filter by the unique ID of the resource affected by the event.

sortstring · enumOptional

Sort order for results by timestamp.

  • asc - ascending (oldest first)
  • desc - descending (newest first, default)
Default: descPossible values:
limitinteger · min: 1 · max: 1000Optional

Maximum number of events to return in a single page.

Used together with offset for offset-based pagination.

Examples:

  • /api/v1/organization/audit-logs?limit=50&offset=0
  • /api/v1/organization/audit-logs?limit=50&offset=50
Default: 50
offsetintegerOptional

Number of items to skip before starting to collect the result set.

Used together with limit for offset-based pagination.

Examples:

  • First page: /api/v1/organization/audit-logs?limit=50&offset=0
  • Second page: /api/v1/organization/audit-logs?limit=50&offset=50
Default: 0
formatstring · enumOptional

Output format of the response.

  • json (default) — returns a JSON body.
  • csv — returns a CSV file download.

Example:

  • /api/v1/organization/audit-logs?format=csv
Default: jsonPossible values:
Responses
chevron-right
200

A paginated list of audit log events, in JSON or CSV format.

Paginated audit log results.

totalintegerOptional

Total number of items matching the filter (may be approximate).

Example: 1234
limitintegerRequired

Maximum number of items returned in this page.

Example: 50
offsetintegerRequired

Offset used for this page.

Example: 0
get
/api/v1/organization/audit-logs

Last updated

Was this helpful?