The Audit Log API provides programmatic access to audit logs for your Anaconda Platform organization. Use it to query, filter, and export audit log events for security monitoring, compliance reporting, and operational analysis.
Anaconda maintains a Jupyter Notebook that contains helper functions for interacting with the Audit Log API:
Authentication
Obtaining a token
Exchange your service account credentials for an access token:
curl --request POST \
--url "https://anaconda.com/api/iam/token" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data "grant_type=client_credentials&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>"
The response includes an access_token:
{
"access_token": "<ACCESS_TOKEN>",
"token_type": "Bearer",
"expires_in": 900,
"refresh_token": "HttpOnly"
}
Tokens expire after 15 minutes (900 seconds). For longer-running export jobs, request a new token when the current one expires.
Making authenticated requests
Include the token in the Authorization header, along with X-Org-Name and X-API-Version headers:
curl --request GET \
--url "https://anaconda.com/api/audit-logs" \
--header "Authorization: Bearer <ACCESS_TOKEN>" \
--header "X-Org-Name: <ORG_ID>" \
--header "X-API-Version: v1"
Base URL
Endpoints