Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.knoxcall.com/llms.txt

Use this file to discover all available pages before exploring further.

List Audit Logs

GET /v1/audit-logs
Returns a paginated list of audit log entries, newest first. You can filter by action type and resource type.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
per_pageinteger20Items per page (max 100)
actionstringFilter by action (e.g., create, update, delete)
resource_typestringFilter by resource type (e.g., route, secret, client, webhook, environment, api_key)

Response

{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "action": "create",
      "resource_type": "route",
      "resource_id": "rt-uuid-1",
      "details": {
        "name": "Payment Gateway",
        "target_base_url": "https://api.stripe.com/v1"
      },
      "ip_address": "203.0.113.42",
      "created_at": "2026-03-10T14:22:01.000Z"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "action": "update",
      "resource_type": "secret",
      "resource_id": "sec-uuid-1",
      "details": {
        "field": "value",
        "environment": "production"
      },
      "ip_address": "203.0.113.42",
      "created_at": "2026-03-10T14:20:00.000Z"
    }
  ],
  "meta": {
    "total": 487,
    "page": 1,
    "per_page": 20,
    "total_pages": 25,
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
# List all audit logs
curl "https://api.knoxcall.com/v1/audit-logs" \
  -H "Authorization: Bearer tk_live_abc123..."

# Filter by action and resource type
curl "https://api.knoxcall.com/v1/audit-logs?action=delete&resource_type=route" \
  -H "Authorization: Bearer tk_live_abc123..."

Common Action Types

Standard CRUD actions appear on any resource type:
ActionDescription
createA resource was created
updateA resource was modified
deleteA resource was deleted
enableA resource was enabled
disableA resource was disabled
revokeAn API key was revoked
Critical audit chain actions — these go into the separate audit_log_critical table (see below):
ActionDescription
byok.kms.onboardCustomer KMS provider onboarded (BYOK)
byok.kms.rotateTenant master key rotated
byok.kms.unsealTenant unsealed after KMS access restored
byok.kms.revokeTenant master key version explicitly revoked (cryptographic erasure)
migration.createSecret store migration created
migration.cancelMigration cancelled
migration.item.revealReviewer revealed plaintext value of a migration item
migration.item.approveReviewer approved a migration item
migration.item.rejectReviewer rejected a migration item
migration.item.expireMigration item TTL expired (cron-driven)
migration.commitOperator committed the migration as complete
migration.credentials.expiredMigration provider credentials expired
migration.db_proxy_route.createDB proxy route created for a migration
migration.db_proxy_route.deleteDB proxy route deleted
tenant.impersonateKnoxCall support admin impersonated a tenant

Common Resource Types

General audit log resource types:
Resource TypeDescription
routeAPI proxy route
secretEncrypted secret
clientAuthorized client
webhookWebhook configuration
environmentEnvironment definition
api_keyAPI key
environment_configRoute environment override
Critical audit chain resource types (see audit_log_critical below):
Resource TypeDescription
tenant_kms_configBYOK KMS configuration
tenant_master_keyTenant master key version
secret_migrationSecret store migration job
secret_migration_itemIndividual item within a migration
migration_db_proxy_routeDB proxy route record for a migration
migration_credentialProvider credential record for a migration
tenant_impersonation_sessionAdmin impersonation session
Audit logs are immutable and cannot be deleted. They are retained according to your subscription plan’s data retention policy.