Audit Logs API
Overview
Fetch Audit Logs
import requests
import os
# API credentials
api_endpoint = "<YOUR_API_ENDPOINT>"
api_key = "<YOUR_API_KEY>"
api_secret = "<YOUR_API_SECRET>"
graphql_query = """
query GetAuditLogs {
getAuditLogs {
auditLogs {
id
createdDttm
updatedDttm
workspaceId
workspaceName
actorType
actorUserId
actorEmail
eventSourceId
eventSource
eventId
eventType
metadataJson
}
}
}
"""
response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
"Content-Type": "application/json",
"X-API-KEY": api_key,
"X-API-SECRET": api_secret,
})
print(response.json())Last updated
Was this helpful?