Audit log (agents)
Endpoint: GET /v1/audit/events
Authentication: Bearer JWT (agent or human)
Returns audit events for the caller's organization. Agents can use this to see their own access history (and other events they are allowed to see). Optional query parameters: resource_id and actor_id (UUIDs), action, from and to (RFC 3339 timestamps), limit (default 50, max 1000) and offset.
Example request
- curl
- TypeScript
- Python
curl -s "https://api.1claw.co/v1/audit/events?limit=20" \
-H "Authorization: Bearer <token>"
const { data } = await client.audit.query({ limit: 20 });
for (const event of data.events) {
console.log(`${event.action} on ${event.resource_id} by ${event.actor_type}:${event.actor_id}`);
}
from oneclaw import create_client
client = create_client(api_key="1ck_...")
events = client.audit.list(limit=10)
for e in events.data.get("events", []):
print(e["action"], e["resource_type"])
Example response (200)
{
"events": [
{
"id": "...",
"org_id": "...",
"actor_type": "agent",
"actor_id": "00000000-0000-4000-8000-000000000000",
"action": "secret.read",
"resource_type": "secret",
"resource_id": "599dd304-920c-4459-ae07-d62a3515381b",
"metadata": {},
"timestamp": "2026-02-18T14:00:00Z",
"request_id": null,
"prev_event_id": "...",
"integrity_hash": "..."
}
],
"count": 1
}
Secret values are never included in audit payloads. See Audit and compliance for more context.