Audit Logs API
Monitor API activity and maintain compliance with comprehensive audit logs.
Get Audit Logs
GET
https://api.example.com/orgs/{org_uuid}/api/logsRetrieve the audit logs for your organization.
curl -X GET "https://api.example.com/orgs/{org_uuid}/api/logs" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response Example
{
"logs": [
{
"id": "log_12345",
"timestamp": "2025-01-10T12:00:00Z",
"action": "instance.created",
"actor": {
"type": "api_key",
"key_id": "key_abc123"
},
"resource": {
"type": "instance",
"id": "1234-5678-90ab-cdef"
},
"details": {
"image": "ubuntu-20.04",
"size": "small"
},
"ip_address": "203.0.113.42",
"user_agent": "Mozilla/5.0..."
},
{
"id": "log_12346",
"timestamp": "2025-01-10T12:05:00Z",
"action": "instance.destroyed",
"actor": {
"type": "api_key",
"key_id": "key_abc123"
},
"resource": {
"type": "instance",
"id": "1234-5678-90ab-cdef"
},
"ip_address": "203.0.113.42",
"user_agent": "Mozilla/5.0..."
}
],
"total": 234,
"page": 1,
"per_page": 50
}Log Event Types
The following event types are recorded in audit logs:
instance.createdA new instance was created
instance.destroyedAn instance was terminated
key.rotatedAn API key was rotated
key.createdA new API key was created
key.revokedAn API key was revoked