openapi: 3.2.0 info: title: LiteLLM Audit Logging API description: 'Proxy Server to call 100+ LLMs in the OpenAI format. **Customize Swagger Docs** 👉 ```LiteLLM Admin Panel on /ui```. Create, Edit Keys with SSO. Having issues? Try ```Fallback Login``` 💸 ```LiteLLM Model Cost Map```. 🔎 ```LiteLLM Model Hub```. See available models on the proxy. **Docs**' version: 1.102.1 tags: - name: Audit Logging paths: /audit: get: tags: - Audit Logging summary: Get Audit Logs description: '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.' operationId: get_audit_logs_audit_get security: - APIKeyHeader: [] parameters: - name: page in: query required: false schema: type: integer minimum: 1 default: 1 title: Page - name: page_size in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 10 title: Page Size - name: changed_by in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by user or system that performed the action title: Changed By description: Filter by user or system that performed the action - name: changed_by_api_key in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by API key hash that performed the action title: Changed By Api Key description: Filter by API key hash that performed the action - name: action in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by action type (create, update, delete) title: Action description: Filter by action type (create, update, delete) - name: table_name in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by table name that was modified title: Table Name description: Filter by table name that was modified - name: object_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by ID of the object that was modified title: Object Id description: Filter by ID of the object that was modified - name: start_date in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter logs after this date title: Start Date description: Filter logs after this date - name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter logs before this date title: End Date description: Filter logs before this date - name: object_team_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by team_id present in before_value or updated_values JSON (PostgreSQL only) title: Object Team Id description: Filter by team_id present in before_value or updated_values JSON (PostgreSQL only) - name: object_key_hash in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by token (key hash) present in before_value or updated_values JSON (PostgreSQL only) title: Object Key Hash description: Filter by token (key hash) present in before_value or updated_values JSON (PostgreSQL only) - name: search in: query required: false schema: anyOf: - type: string - type: 'null' description: Match a row whose id, object_id, changed_by, or changed_by_api_key equals this value title: Search description: Match a row whose id, object_id, changed_by, or changed_by_api_key equals this value - name: sort_by in: query required: false schema: anyOf: - type: string - type: 'null' description: Column to sort by (e.g. 'updated_at', 'action', 'table_name') title: Sort By description: Column to sort by (e.g. 'updated_at', 'action', 'table_name') - name: sort_order in: query required: false schema: type: string description: Sort order ('asc' or 'desc') default: desc title: Sort Order description: Sort order ('asc' or 'desc') responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PaginatedAuditLogResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /audit/{id}: get: tags: - Audit Logging summary: Get Audit Log By Id description: 'Get detailed information about a specific audit log entry by its ID. Args: id (str): The unique identifier of the audit log entry Returns: AuditLogResponse: Detailed information about the audit log entry Raises: HTTPException: If the audit log is not found or if there''s a database connection error' operationId: get_audit_log_by_id_audit__id__get security: - APIKeyHeader: [] parameters: - name: id in: path required: true schema: type: string title: Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AuditLogResponse' '404': description: Audit log not found '500': description: Database connection error '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: AuditLogResponse: properties: id: type: string title: Id updated_at: type: string format: date-time title: Updated At changed_by: type: string title: Changed By changed_by_api_key: type: string title: Changed By Api Key action: type: string title: Action table_name: type: string title: Table Name object_id: type: string title: Object Id before_value: anyOf: - additionalProperties: true type: object - type: 'null' title: Before Value updated_values: anyOf: - additionalProperties: true type: object - type: 'null' title: Updated Values type: object required: - id - updated_at - changed_by - changed_by_api_key - action - table_name - object_id title: AuditLogResponse description: Response model for a single audit log entry PaginatedAuditLogResponse: properties: audit_logs: items: $ref: '#/components/schemas/AuditLogResponse' type: array title: Audit Logs total: type: integer title: Total description: Total number of audit logs matching the filters page: type: integer title: Page description: Current page number page_size: type: integer title: Page Size description: Number of items per page total_pages: type: integer title: Total Pages description: Total number of pages type: object required: - audit_logs - total - page - page_size - total_pages title: PaginatedAuditLogResponse description: Response model for paginated audit logs ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError securitySchemes: APIKeyHeader: type: apiKey description: Bearer token in: header name: x-litellm-api-key