Skip to content

Audit Logs ​

View the audit trail of all administrative actions. Every credential, admin key, and user account operation is logged.

Permission Required ​

Requires the view_audit_logs permission.

Request ​

http
GET /v1/admin/audit-logs
Authorization: Bearer {admin_key}

Query Parameters ​

ParameterTypeDefaultDescription
limitinteger50Results per page (1-100)
offsetinteger0Pagination offset
actionstring-Filter by action type
admin_key_idUUID-Filter by admin who performed action
target_idUUID-Filter by target resource ID

Example Request ​

Get recent audit logs:

bash
curl -X GET "https://api.insight.iagon.com/v1/admin/audit-logs" \
  -H "Authorization: Bearer YOUR_ADMIN_KEY"

Filter by action type:

bash
curl -X GET "https://api.insight.iagon.com/v1/admin/audit-logs?action=credential.created" \
  -H "Authorization: Bearer YOUR_ADMIN_KEY"

Filter by target (e.g., a specific credential):

bash
curl -X GET "https://api.insight.iagon.com/v1/admin/audit-logs?target_id=660e8400-e29b-41d4-a716-446655440001" \
  -H "Authorization: Bearer YOUR_ADMIN_KEY"

Response ​

Success (200 OK) ​

json
{
  "success": true,
  "data": [
    {
      "id": "880e8400-e29b-41d4-a716-446655440010",
      "action": "credential.created",
      "admin_key_id": "770e8400-e29b-41d4-a716-446655440002",
      "admin_entity_name": "PartnerCompany",
      "target_id": "660e8400-e29b-41d4-a716-446655440001",
      "target_type": "credential",
      "ip_address": "192.168.1.100",
      "details": {
        "name": "Acme Production Key"
      },
      "created_at": "2026-01-26T12:00:00Z"
    },
    {
      "id": "880e8400-e29b-41d4-a716-446655440011",
      "action": "user_account.created",
      "admin_key_id": "770e8400-e29b-41d4-a716-446655440002",
      "admin_entity_name": "PartnerCompany",
      "target_id": "550e8400-e29b-41d4-a716-446655440000",
      "target_type": "user_account",
      "ip_address": "192.168.1.100",
      "details": {
        "name": "Acme Corp",
        "external_id": "customer_12345"
      },
      "created_at": "2026-01-26T11:30:00Z"
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 156
  }
}

Audit Log Entry ​

FieldTypeDescription
idUUIDUnique log entry ID
actionstringThe action that was performed
admin_key_idUUIDAdmin key that performed the action
admin_entity_namestringEntity name of the admin
target_idUUID | nullID of the affected resource
target_typestringType of resource (credential, user_account, admin_key)
ip_addressstring | nullIP address of the request
detailsobjectAdditional action-specific details
created_atISO 8601When the action occurred

Action Types ​

Credential Actions ​

ActionDescription
credential.createdNew API credential was created
credential.revokedAPI credential was revoked
credential.viewedSingle credential was viewed
credential.listedCredentials list was accessed

User Account Actions ​

ActionDescription
user_account.createdNew user account was created
user_account.updatedUser account was updated
user_account.suspendedUser account was suspended
user_account.reactivatedUser account was reactivated
user_account.viewedSingle user account was viewed
user_account.listedUser accounts list was accessed

Admin Key Actions ​

ActionDescription
admin_key.createdNew admin key was created
admin_key.revokedAdmin key was revoked

Use Cases ​

Security Investigation ​

Find all actions by a specific admin key:

bash
curl -X GET "https://api.insight.iagon.com/v1/admin/audit-logs?admin_key_id=770e8400-e29b-41d4-a716-446655440002" \
  -H "Authorization: Bearer YOUR_ADMIN_KEY"

Track Resource History ​

See all actions affecting a specific credential:

bash
curl -X GET "https://api.insight.iagon.com/v1/admin/audit-logs?target_id=660e8400-e29b-41d4-a716-446655440001" \
  -H "Authorization: Bearer YOUR_ADMIN_KEY"

Monitor Revocations ​

Track credential and admin key revocations:

bash
curl -X GET "https://api.insight.iagon.com/v1/admin/audit-logs?action=credential.revoked" \
  -H "Authorization: Bearer YOUR_ADMIN_KEY"