GET
/
audit-logs
curl --request GET \
  --url https://api.portkey.ai/v1/audit-logs \
  --header 'x-portkey-api-key: <api-key>'
{
  "records": [
    {
      "timestamp": "<string>",
      "method": "POST",
      "uri": "<string>",
      "request_id": "<string>",
      "request_body": "<string>",
      "query_params": "<string>",
      "request_headers": "<string>",
      "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "user_type": "user",
      "organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "workspace_id": "<string>",
      "response_status_code": 123,
      "resource_type": "<string>",
      "action": "<string>",
      "client_ip": "<string>",
      "country": "<string>"
    }
  ],
  "total": 123,
  "object": "analytics-graph"
}

Authorizations

x-portkey-api-key
string
header
required

Query Parameters

start_time
string
required

Start time for filtering logs (ISO8601 format)

end_time
string
required

End time for filtering logs (ISO8601 format)

organisation_id
string
required

Organisation ID for filtering logs

method
enum<string>

HTTP method for filtering logs

Available options:
POST,
PUT,
DELETE
uri
string

URI path for filtering logs

request_id
string

Request ID for filtering logs

user_id
string

User ID for filtering logs

user_type
enum<string>

Type of user for filtering logs

Available options:
user,
api_key
workspace_id
string

Workspace ID for filtering logs

response_status_code
integer

HTTP response status code for filtering logs

resource_type
string

Resource type for filtering logs

action
string

Action type for filtering logs

client_ip
string

Client IP address for filtering logs

country
string

Country for filtering logs

current_page
integer

Current page number for pagination

Required range: x >= 0
page_size
integer

Number of items per page

Required range: 0 <= x <= 100

Response

200 - application/json
Successful response
records
object[]
total
integer

Total number of records in the response

object
enum<string>

The type of object being returned

Available options:
analytics-graph