Audit Logging

Get Audit Logs

Get all audit logs with filtering and pagination.

Returns a paginated response of audit logs matching the specified filters.

Note: object_team_id and object_key_hash use Prisma JSON path filtering, which requires PostgreSQL.

get/audit

Request

  • Base URL: https://docs.litellm.com.cn (the document declares no server; this is the origin it was published from)
  • URL: https://docs.litellm.com.cn/audit
  • Auth: API key in header x-litellm-api-key

Query parameters

pageinteger
page_sizeinteger
changed_bystring nullable

Filter by user or system that performed the action

changed_by_api_keystring nullable

Filter by API key hash that performed the action

actionstring nullable

Filter by action type (create, update, delete)

table_namestring nullable

Filter by table name that was modified

object_idstring nullable

Filter by ID of the object that was modified

start_datestring nullable

Filter logs after this date

end_datestring nullable

Filter logs before this date

object_team_idstring nullable

Filter by team_id present in before_value or updated_values JSON (PostgreSQL only)

object_key_hashstring nullable

Filter by token (key hash) present in before_value or updated_values JSON (PostgreSQL only)

searchstring nullable

Match a row whose id, object_id, changed_by, or changed_by_api_key equals this value

sort_bystring nullable

Column to sort by (e.g. 'updated_at', 'action', 'table_name')

sort_orderstring

Sort order ('asc' or 'desc')

Response

Successful Response

totalinteger required

Total number of audit logs matching the filters

pageinteger required

Current page number

page_sizeinteger required

Number of items per page

total_pagesinteger required

Total number of pages

Changes

No recorded changes to this operation across all 1 revision of this API.