Skip to main content
Contents

Audit trail

Who did what in your organization, and when.

Examples marked as generated are built from the schema with synthetic values.

GET/api/v2/audit-events

List audit events

Returns the audit trail of the active organization: who did what, and when.

Authentication
API token or portal session
Required permission
audit.read

Parameters

Parameters listAuditEvents
NameInTypeRequiredRules
limitQueryintegerNo
  • Minimum 1
  • Maximum 200
  • Default: 50
cursorQuerystringNo
  • At most 512 characters
site_idQuerystringNo
  • Pattern: ^site_([0-9a-f]{7}|[0-9a-f]{12})$
resource_typeQuerystringNo
  • Pattern: ^[a-z][a-z0-9_]{0,63}$
resource_idQuerystringNo
  • At most 128 characters
actionQuerystringNo
  • Pattern: ^[a-z][a-z0-9_.]{0,127}$
actor_idQuerystringNo
  • Pattern: ^usr_[0-9a-f]{32}$
fromQuerystringNo
  • Format: date-time
toQuerystringNo
  • Format: date-time

Responses

  • 200OKapplication/json

    Fields (21)
    Responses listAuditEvents 200
    FieldTypeRequiredRules
    dataarray<object>Yes
    data[].idstringYes
    data[].occurred_atstringYes
    • Format: date-time
    data[].actorobjectYes
    data[].actor.typestringYes
    • One of: user, api_token, system, edge_agent, migration, provider_webhook
    data[].actor.user_idstringYes
    • Can be null
    data[].actor.emailstringYes
    • Can be null
    data[].actor.token_idstringYes
    • Can be null
    data[].actor.impersonatedbooleanYes
    data[].actor.staffbooleanYes
    data[].actionstringYes
    data[].resource_typestringYes
    data[].resource_idstringYes
    • Can be null
    data[].outcomestringYes
    • One of: success, denied, failure
    data[].request_idstringYes
    • Can be null
    data[].ipstringYes
    • Can be null
    data[].changesobjectYes
    • Can be null
    data[].metadataobjectYes
    • Can be null
    paginationobjectYes
    pagination.next_cursorstringYes
    • Can be null
    pagination.has_morebooleanYes
    Example (generated from the schema)
    {
      "data": [
        {
          "id": "id_example",
          "occurred_at": "2026-01-15T10:00:00Z",
          "actor": {
            "type": "user",
            "user_id": "user_example",
            "email": "user@example.test",
            "token_id": "token_example",
            "impersonated": false,
            "staff": false
          },
          "action": "site.updated",
          "resource_type": "string",
          "resource_id": "resource_example",
          "outcome": "success",
          "request_id": "req_01EXAMPLE00000000000000000",
          "ip": "string",
          "changes": {},
          "metadata": {}
        }
      ],
      "pagination": {
        "next_cursor": "string",
        "has_more": false
      }
    }
  • 400Bad requestapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/malformed_request",
      "title": "Malformed request",
      "status": 400,
      "code": "malformed_request",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 401Unauthorizedapplication/problem+json

    Headers: WWW-Authenticate

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/unauthenticated",
      "title": "Authentication required",
      "status": 401,
      "code": "unauthenticated",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl 'https://api.cdnify.lat/api/v2/audit-events' \
  -H "Authorization: Bearer $CDNIFY_API_TOKEN"