list_audit_logs
Lists audit log records for Portkey organizations within a time range to support compliance and incident review. Enterprise plan only; other plans receive a permissions error.
Instructions
List audit log records for a Portkey organization within a time range (Enterprise plan only; other plans get a permissions error). Each record is a state-changing API request (POST, PUT, or DELETE) with timestamp, method, uri, request_id, user_id, user_type (user or api_key), organisation_id, workspace_id, response_status_code, resource_type, action, client_ip, country, plus request_body, query_params, and request_headers as JSON strings. Use it for compliance or incident review of individual events; use analytics instead for aggregates. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | Filter by request URI path | |
| action | No | Filter by action type (e.g., 'create', 'update', 'delete') | |
| method | No | Filter by HTTP method of the audited request | |
| country | No | Filter by country derived from the client IP | |
| user_id | No | Filter by the ID of the user or API key that made the request | |
| end_time | Yes | End of time range filter (ISO 8601 format, e.g., '2024-01-31T23:59:59Z') | |
| client_ip | No | Filter by client IP address | |
| page_size | No | Number of results per page (max 100) | |
| user_type | No | Filter by whether the request came from a user or an API key | |
| request_id | No | Filter by request ID | |
| start_time | Yes | Start of time range filter (ISO 8601 format, e.g., '2024-01-01T00:00:00Z') | |
| current_page | No | Zero-based page number; the first page is 0 | |
| workspace_id | No | Filter audit logs by workspace ID | |
| resource_type | No | Filter by resource type (e.g., 'workspace', 'config', 'virtual_key') | |
| organisation_id | Yes | Organisation ID whose audit logs to list | |
| response_status_code | No | Filter by HTTP response status code (e.g., 200, 403) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |