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/logs

Retrieve 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.created

A new instance was created

instance.destroyed

An instance was terminated

key.rotated

An API key was rotated

key.created

A new API key was created

key.revoked

An API key was revoked