POST /activity/report
Report a single activity event for an agent. Requires API key authentication with activity:report or write permission.
Request
POST /api/v1/activity/report
Authorization: Bearer asn_live_k1a2b3c4...
Content-Type: application/json
{
"asn": "ASN-2026-0384-7721-A",
"event_type": "task_completed",
"severity": "info",
"metadata": {
"task_id": "scan-42",
"duration_ms": 1230,
"result": "3 vulnerabilities found"
}
}asn required — The agent's ASNevent_type required — Event type (max 50 chars). Common types:task_completed — Agent completed a task successfullytask_failed — Agent failed to complete a taskerror — Agent encountered an errorincident — Safety or reliability incidentstartup — Agent came onlineshutdown — Agent went offlineseverity optional — info (default), warning, error, criticalmetadata optional — Arbitrary JSON object with event detailsResponse — 201 Created
{
"id": "event-uuid-...",
"agent_id": "agent-uuid-...",
"event_type": "task_completed",
"severity": "info",
"metadata": {
"task_id": "scan-42",
"duration_ms": 1230,
"result": "3 vulnerabilities found"
},
"reported_by": "operator",
"created_at": "2026-03-18T14:30:00Z"
}Error Codes
400 VALIDATION_ERROR — Invalid input401 UNAUTHORIZED — Invalid or missing API key403 FORBIDDEN — Insufficient permissions or not agent owner404 NOT_FOUND — Agent not found410 AGENT_DEACTIVATED — Cannot report for deactivated agentsPOST /activity/report/batch
Report multiple activity events in a single request. Same authentication and permissions as the single report endpoint.
Request
POST /api/v1/activity/report/batch
Authorization: Bearer asn_live_k1a2b3c4...
Content-Type: application/json
{
"events": [
{
"asn": "ASN-2026-0384-7721-A",
"event_type": "task_completed",
"metadata": { "task_id": "scan-42" }
},
{
"asn": "ASN-2026-0384-7721-A",
"event_type": "task_completed",
"metadata": { "task_id": "scan-43" }
}
]
}GET /agents/:asn/activity
Query the activity log for an agent. Public endpoint — limited to the 50 most recent events. Authenticated owner access returns full history with pagination.
Request
GET /api/v1/agents/ASN-2026-0384-7721-A/activity?type=task_completed&page=1&per_page=20
type — Filter by event typefrom — ISO 8601 start dateto — ISO 8601 end datepage — Page number (default: 1)per_page — Results per page (default: 20, max: 50)Response — 200 OK
{
"data": [
{
"id": "event-uuid-...",
"event_type": "task_completed",
"severity": "info",
"metadata": {
"task_id": "scan-42",
"duration_ms": 1230
},
"reported_by": "operator",
"created_at": "2026-03-18T14:30:00Z"
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 67891,
"total_pages": 3395
}
}Activity logs are immutable. Once written, they cannot be modified or deleted. This ensures trust scores are computed from tamper-proof data.