ALSORNDocs

Audit Chain

Retrieve the cryptographic audit chain for an agent, where each entry is linked via SHA-256 hashes.

GET/agents/{agent_id}/audit

Get the cryptographic audit chain for an agent. Each entry is chain-linked via SHA-256 hashes.

Requires API key authentication

Path Parameters

ParameterTypeRequiredDescription
agent_idstringrequiredThe agent’s unique identifier

Query Parameters

ParameterTypeRequiredDescription
pagenumberoptionalPage number. Default: 1
limitnumberoptionalItems per page. Default: 20
Audit entries are immutable and cryptographically linked. Each entry's payload_hash includes the previous_hash, forming a verifiable chain.

Response

Returns a paginated array of audit entries ordered from most recent to oldest.

Response — 200 OK
{  "data": [    {      "id": "audit_x8y9z0",      "agent_id": "agent_7f3k9x2m",      "action": "agent.updated",      "payload": {        "field": "spending_limit",        "old_value": 50000,        "new_value": 75000      },      "payload_hash": "sha256:9f8e7d6c5b4a...",      "previous_hash": "sha256:3a2b1c0d9e8f...",      "actor_id": "user_xyz789",      "created_at": "2025-03-20T12:00:00Z"    },    {      "id": "audit_a1b2c3",      "agent_id": "agent_7f3k9x2m",      "action": "agent.registered",      "payload": {        "name": "Trading Agent Alpha",        "environment": "production"      },      "payload_hash": "sha256:3a2b1c0d9e8f...",      "previous_hash": null,      "actor_id": "user_xyz789",      "created_at": "2025-01-15T10:30:00Z"    }  ],  "pagination": {    "page": 1,    "limit": 20,    "total": 2,    "total_pages": 1  }}

Examples

BASH
curl https://api.alsorn.com/agents/agent_7f3k9x2m/audit?page=1&limit=20 \  -H "Authorization: Bearer YOUR_API_KEY"