# Audit Logs

Audit logs provide a record of all actions taken in the workspace, including who performed the action, when it was done, and what was changed. Learn more about audit logs [here](https://docs.secoda.com/features/audit-log).

## List Audit Logs

> This endpoint retrieves a list of audit logs for the workspace, providing a comprehensive record of actions taken by users, systems, and integrations.\
> \
> The audit logs can be filtered and sorted using the advanced filter and sort query parameters, which allow for complex filtering based on multiple criteria.<br>

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Audit Logs","description":"Audit logs provide a record of all actions taken in the workspace, including who performed the action, when it was done, and what was changed. Learn more about audit logs [here](https://docs.secoda.com/features/audit-log).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/activity_log/audit_logs/":{"get":{"operationId":"api_list_audit_logs","summary":"List Audit Logs","parameters":[{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"description":"A serialized and URL encoded JSON object to define filters on the audit logs.\nThis follows the same pattern as catalog filters, allowing for complex filtering based on multiple criteria.\n"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"A serialized and URL encoded JSON object to define the sort pattern on the audit logs.\n"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number for paginated results (default is 1)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1_ActivityLogOutPaginated"}}}}},"description":"This endpoint retrieves a list of audit logs for the workspace, providing a comprehensive record of actions taken by users, systems, and integrations.\n\nThe audit logs can be filtered and sorted using the advanced filter and sort query parameters, which allow for complex filtering based on multiple criteria.\n","tags":["Audit Logs"]}}},"components":{"schemas":{"v1_ActivityLogOutPaginated":{"properties":{"results":{"items":{"$ref":"#/components/schemas/v1_ActivityLogOut"},"title":"Results","type":"array"},"total_pages":{"title":"Total Pages","type":"integer"},"count":{"title":"Count","type":"integer"},"meta":{"$ref":"#/components/schemas/v1_ActivityLogPaginationMeta"}},"required":["results","total_pages","count","meta"],"title":"ActivityLogOutPaginated","type":"object"},"v1_ActivityLogOut":{"properties":{"id":{"title":"Id","type":"string"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"activity_type":{"title":"Activity Type","type":"string"},"performer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performer Id"},"performer_type":{"enum":["API","AUTOMATION","INTEGRATION","EXTRACTION","SYSTEM","USER","UNKNOWN","MONITOR"],"title":"Performer Type","type":"string"},"performer_metadata":{"anyOf":[{"$ref":"#/components/schemas/v1_ActivityLogPerformerMetadata"},{"type":"null"}]},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"resource_type":{"anyOf":[{"enum":["API_KEY","AUTOMATION","AUTOMATION_JOB","BACKGROUND_JOB","COMMENT","CUSTOM_PROPERTY","DATABUILDER_JOB","DATA_ACCESS_REQUEST","IAM_ROLE","IAM_RESOURCE_POLICY","INCIDENT","INTEGRATION","INVITATION_LINK","LINEAGE","MARKETPLACE_INTEGRATION_SPEC","MARKETPLACE_INTEGRATION_SPEC_VERSION","METRIC","MONITOR","MONITOR_NOTIFICATION_RULE","OWNER","OWNER_GROUP","POLICY","POLICY_RESULT","QUERY","QUESTION","QUESTION_REPLY","REPORT","S3_OBJECT","SECODA_ENTITY","SUBSCRIBER","SUBSCRIBER_GROUP","TAG","TAG_GROUP","TEAM","USER","USER_GROUP","WIDGET","WORKSPACE"],"type":"string"},{"type":"null"}],"title":"Resource Type"},"resource_metadata":{"anyOf":[{"$ref":"#/components/schemas/v1_ActivityLogResourceMetadata"},{"type":"null"}]},"related_resource_ids":{"items":{"type":"string"},"title":"Related Resource Ids","type":"array"},"related_resource_type":{"anyOf":[{"enum":["API_KEY","AUTOMATION","AUTOMATION_JOB","BACKGROUND_JOB","COMMENT","CUSTOM_PROPERTY","DATABUILDER_JOB","DATA_ACCESS_REQUEST","IAM_ROLE","IAM_RESOURCE_POLICY","INCIDENT","INTEGRATION","INVITATION_LINK","LINEAGE","MARKETPLACE_INTEGRATION_SPEC","MARKETPLACE_INTEGRATION_SPEC_VERSION","METRIC","MONITOR","MONITOR_NOTIFICATION_RULE","OWNER","OWNER_GROUP","POLICY","POLICY_RESULT","QUERY","QUESTION","QUESTION_REPLY","REPORT","S3_OBJECT","SECODA_ENTITY","SUBSCRIBER","SUBSCRIBER_GROUP","TAG","TAG_GROUP","TEAM","USER","USER_GROUP","WIDGET","WORKSPACE"],"type":"string"},{"type":"null"}],"title":"Related Resource Type"},"event_blocks":{"items":{"$ref":"#/components/schemas/v1_ActivityLogEventBlock"},"title":"Event Blocks","type":"array"},"logged_at":{"format":"date-time","title":"Logged At","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"is_legacy":{"title":"Is Legacy","type":"boolean"},"version_history_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version History Id"},"secoda_entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secoda Entity Type"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"required":["id","activity_type","performer_type","related_resource_ids","event_blocks","logged_at","created_at","updated_at","is_legacy"],"title":"ActivityLogOut","type":"object"},"v1_ActivityLogPerformerMetadata":{"properties":{"id":{"title":"Id","type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"src":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Src"},"integration_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disabled"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"profile_picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture"},"is_service_account":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Service Account"}},"required":["id"],"title":"ActivityLogPerformerMetadata","type":"object"},"v1_ActivityLogResourceMetadata":{"properties":{"id":{"title":"Id","type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"integration_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Id"}},"required":["id"],"title":"ActivityLogResourceMetadata","type":"object"},"v1_ActivityLogEventBlock":{"properties":{"type":{"title":"Type","type":"string"},"style":{"enum":["normal","bold"],"title":"Style","type":"string"},"value":{"title":"Value","type":"string"}},"required":["type","style","value"],"title":"ActivityLogEventBlock","type":"object"},"v1_ActivityLogPaginationMeta":{"properties":{"page":{"title":"Page","type":"integer"},"previous_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Previous Page"},"next_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Page"},"count":{"title":"Count","type":"integer"},"total_pages":{"title":"Total Pages","type":"integer"}},"required":["page","count","total_pages"],"title":"ActivityLogPaginationMeta","type":"object"}}}}
```

## List Resource Logs

> This endpoint retrieves a list of logs for a specific resource, providing a history of changes and actions taken on that resource.<br>

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Audit Logs","description":"Audit logs provide a record of all actions taken in the workspace, including who performed the action, when it was done, and what was changed. Learn more about audit logs [here](https://docs.secoda.com/features/audit-log).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/activity_log/resource_logs/":{"get":{"operationId":"api_list_resource_logs","summary":"List Resource Logs","parameters":[{"name":"resource_id","in":"query","required":true,"schema":{"type":"string"},"description":"ID of the resource to retrieve logs for"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"Page number for paginated results (default is 1)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1_ResourceActivityLogOutPaginated"}}}}},"description":"This endpoint retrieves a list of logs for a specific resource, providing a history of changes and actions taken on that resource.\n","tags":["Audit Logs"]}}},"components":{"schemas":{"v1_ResourceActivityLogOutPaginated":{"properties":{"non_versioned_logs":{"items":{"$ref":"#/components/schemas/v1_ActivityLogOut"},"title":"Non Versioned Logs","type":"array"},"version_histories":{"items":{"$ref":"#/components/schemas/v1_VersionHistoryOut"},"title":"Version Histories","type":"array"},"total_pages":{"title":"Total Pages","type":"integer"},"count":{"title":"Count","type":"integer"},"meta":{"$ref":"#/components/schemas/v1_ActivityLogPaginationMeta"}},"required":["non_versioned_logs","version_histories","total_pages","count","meta"],"title":"ResourceActivityLogOutPaginated","type":"object"},"v1_ActivityLogOut":{"properties":{"id":{"title":"Id","type":"string"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"activity_type":{"title":"Activity Type","type":"string"},"performer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Performer Id"},"performer_type":{"enum":["API","AUTOMATION","INTEGRATION","EXTRACTION","SYSTEM","USER","UNKNOWN","MONITOR"],"title":"Performer Type","type":"string"},"performer_metadata":{"anyOf":[{"$ref":"#/components/schemas/v1_ActivityLogPerformerMetadata"},{"type":"null"}]},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"resource_type":{"anyOf":[{"enum":["API_KEY","AUTOMATION","AUTOMATION_JOB","BACKGROUND_JOB","COMMENT","CUSTOM_PROPERTY","DATABUILDER_JOB","DATA_ACCESS_REQUEST","IAM_ROLE","IAM_RESOURCE_POLICY","INCIDENT","INTEGRATION","INVITATION_LINK","LINEAGE","MARKETPLACE_INTEGRATION_SPEC","MARKETPLACE_INTEGRATION_SPEC_VERSION","METRIC","MONITOR","MONITOR_NOTIFICATION_RULE","OWNER","OWNER_GROUP","POLICY","POLICY_RESULT","QUERY","QUESTION","QUESTION_REPLY","REPORT","S3_OBJECT","SECODA_ENTITY","SUBSCRIBER","SUBSCRIBER_GROUP","TAG","TAG_GROUP","TEAM","USER","USER_GROUP","WIDGET","WORKSPACE"],"type":"string"},{"type":"null"}],"title":"Resource Type"},"resource_metadata":{"anyOf":[{"$ref":"#/components/schemas/v1_ActivityLogResourceMetadata"},{"type":"null"}]},"related_resource_ids":{"items":{"type":"string"},"title":"Related Resource Ids","type":"array"},"related_resource_type":{"anyOf":[{"enum":["API_KEY","AUTOMATION","AUTOMATION_JOB","BACKGROUND_JOB","COMMENT","CUSTOM_PROPERTY","DATABUILDER_JOB","DATA_ACCESS_REQUEST","IAM_ROLE","IAM_RESOURCE_POLICY","INCIDENT","INTEGRATION","INVITATION_LINK","LINEAGE","MARKETPLACE_INTEGRATION_SPEC","MARKETPLACE_INTEGRATION_SPEC_VERSION","METRIC","MONITOR","MONITOR_NOTIFICATION_RULE","OWNER","OWNER_GROUP","POLICY","POLICY_RESULT","QUERY","QUESTION","QUESTION_REPLY","REPORT","S3_OBJECT","SECODA_ENTITY","SUBSCRIBER","SUBSCRIBER_GROUP","TAG","TAG_GROUP","TEAM","USER","USER_GROUP","WIDGET","WORKSPACE"],"type":"string"},{"type":"null"}],"title":"Related Resource Type"},"event_blocks":{"items":{"$ref":"#/components/schemas/v1_ActivityLogEventBlock"},"title":"Event Blocks","type":"array"},"logged_at":{"format":"date-time","title":"Logged At","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"is_legacy":{"title":"Is Legacy","type":"boolean"},"version_history_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version History Id"},"secoda_entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secoda Entity Type"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"required":["id","activity_type","performer_type","related_resource_ids","event_blocks","logged_at","created_at","updated_at","is_legacy"],"title":"ActivityLogOut","type":"object"},"v1_ActivityLogPerformerMetadata":{"properties":{"id":{"title":"Id","type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"src":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Src"},"integration_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disabled"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"profile_picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Picture"},"is_service_account":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Service Account"}},"required":["id"],"title":"ActivityLogPerformerMetadata","type":"object"},"v1_ActivityLogResourceMetadata":{"properties":{"id":{"title":"Id","type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"integration_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Id"}},"required":["id"],"title":"ActivityLogResourceMetadata","type":"object"},"v1_ActivityLogEventBlock":{"properties":{"type":{"title":"Type","type":"string"},"style":{"enum":["normal","bold"],"title":"Style","type":"string"},"value":{"title":"Value","type":"string"}},"required":["type","style","value"],"title":"ActivityLogEventBlock","type":"object"},"v1_VersionHistoryOut":{"properties":{"id":{"title":"Id","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"latest_activity_logged_at":{"format":"date-time","title":"Latest Activity Logged At","type":"string"},"resource_id":{"title":"Resource Id","type":"string"},"activity_logs":{"items":{"$ref":"#/components/schemas/v1_ActivityLogOut"},"title":"Activity Logs","type":"array"},"metadata":{"$ref":"#/components/schemas/v1_VersionHistoryMetadata"},"is_legacy":{"title":"Is Legacy","type":"boolean"},"secoda_entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secoda Entity Type"},"older_than_thirty_days":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Older Than Thirty Days"}},"required":["id","created_at","updated_at","latest_activity_logged_at","resource_id","activity_logs","metadata","is_legacy"],"title":"VersionHistoryOut","type":"object"},"v1_VersionHistoryMetadata":{"properties":{"prev":{"additionalProperties":true,"title":"Prev","type":"object"},"current":{"additionalProperties":true,"title":"Current","type":"object"},"definition_diff":{"additionalProperties":true,"title":"Definition Diff","type":"object"},"description_diff":{"additionalProperties":true,"title":"Description Diff","type":"object"},"secoda_entity_property_snapshot":{"anyOf":[{"$ref":"#/components/schemas/v1_SecodaEntityPropertySnapshot"},{"type":"null"}]}},"required":["prev","current","definition_diff","description_diff"],"title":"VersionHistoryMetadata","type":"object"},"v1_SecodaEntityPropertySnapshot":{"properties":{"owners":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Owners"},"owners_groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Owners Groups"},"collections":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collections"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"definition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Definition"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"},"pii":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pii"},"teams":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Teams"},"properties2":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties2"}},"title":"SecodaEntityPropertySnapshot","type":"object"},"v1_ActivityLogPaginationMeta":{"properties":{"page":{"title":"Page","type":"integer"},"previous_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Previous Page"},"next_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Page"},"count":{"title":"Count","type":"integer"},"total_pages":{"title":"Total Pages","type":"integer"}},"required":["page","count","total_pages"],"title":"ActivityLogPaginationMeta","type":"object"}}}}
```


---

# 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.secoda.co/api/reference/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.
