# Audit Logs

Use these operations to interact with [audit logs](/configure/settings/audit-logs.md) in Cortex.

### Required permissions

Your API token must have the `View audit logs` permission.

## Retrieve audit logs

> Note: To see the complete list of possible values, please reference the available filter options for \[audit logs under Settings in the app]\(<https://app.getcortexapp.com/admin/settings/audit-logs>).  API key must have the \`View audit logs\` permission.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Audit Logs"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"AuditLogsResponse":{"required":["logs","page","total","totalPages"],"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogResponse"}},"page":{"type":"integer","description":"Current page number, 0-indexed","format":"int32"},"total":{"type":"integer","description":"Total number of results","format":"int32"},"totalPages":{"type":"integer","description":"Total number of pages","format":"int32"}}},"AuditLogResponse":{"required":["action","objectIdentifier","objectType","timestamp"],"type":"object","properties":{"action":{"type":"string","description":"Type of action performed","enum":["CREATE","UPDATE","DELETE"]},"actorIdentifier":{"type":"string","description":"Readable identifier of the authenticated actor. This could an be OAuth user email, API key identifier, attributed webhook, etc."},"ipAddress":{"type":"string","description":"IP address of the actor"},"objectIdentifier":{"type":"string","description":"Readable identifier of the object acted upon"},"objectType":{"type":"string","description":"Type of object acted upon"},"timestamp":{"type":"string","format":"date-time"}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/audit-logs":{"get":{"description":"Note: To see the complete list of possible values, please reference the available filter options for [audit logs under Settings in the app](https://app.getcortexapp.com/admin/settings/audit-logs).  API key must have the `View audit logs` permission.","operationId":"getAuditLogs","parameters":[{"in":"query","name":"startTime","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"endTime","required":false,"schema":{"type":"string","format":"date-time"}},{"description":"Page number to return, 0-indexed. Default 0.","in":"query","name":"page","required":true,"schema":{"type":"integer","format":"int32","default":0}},{"description":"Number of results to return per page, between 1 and 1000. Default 250.","in":"query","name":"pageSize","required":true,"schema":{"type":"integer","format":"int32","default":250}},{"in":"query","name":"actions","required":false,"schema":{"type":"array","items":{"type":"string","enum":["CREATE","READ","UPDATE","DELETE"]}}},{"in":"query","name":"objectIdentifiers","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"description":"Filter by Cortex object types (CATALOG, SERVICE, TEAM, SCORECARD, etc), integration configurations (AWS_CONFIGURATION, BITBUCKET_CONFIGURATION, etc), and more.","in":"query","name":"objectTypes","required":false,"schema":{"type":"string","enum":["CATALOG","TEAM","AWS_CONFIGURATION","BITBUCKET_CONFIGURATION"]}},{"in":"query","name":"actorTypes","required":false,"schema":{"type":"array","items":{"type":"string","enum":["API_KEY","PERSONAL_API_KEY","OAUTH2","BACKSTAGE","ANONYMOUS"]}}},{"in":"query","name":"actorApiKeyIdentifiers","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"actorEmails","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"actorIpAddresses","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"actorRequestTypes","required":false,"schema":{"type":"string","enum":["API_KEY_ENTITY","ATLASSIAN_WEBHOOK","SCORECARD_BADGES","SLACK_COMMAND"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogsResponse"}}},"description":"Successfully retrieved audit logs"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Retrieve audit logs","tags":["Audit Logs"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cortex.io/api/readme/audit-logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
