Appearance
Logs API
View your API usage logs.
Get Usage Logs
bash
curl -s "https://api.universalapi.co/logs?timeRange=24&pageSize=20" \
-H "Authorization: Bearer YOUR_TOKEN" | jq| Parameter | Type | Default | Description |
|---|---|---|---|
resourceId | string | — | Filter by resource ID (agent or MCP server UUID). Uses efficient GSI lookup. |
timeRange | number | 24 | Hours to look back |
pageSize | number | 50 | Results per page |
page | number | 0 | Page number |
status | string | — | Filter: success, error, timeout |
Get All Logs
bash
curl -s "https://api.universalapi.co/logs" \
-H "Authorization: Bearer YOUR_TOKEN" | jqGet Request Details
bash
curl -s "https://api.universalapi.co/logs/req-xxx" \
-H "Authorization: Bearer YOUR_TOKEN" | jqReturns full request/response bodies, compute metrics, billing info, and error details.
Parent Lineage Fields (Agent→MCP Correlation)
When an MCP server is invoked by a UAPI agent, the log record includes parent lineage fields:
| Field | Type | Description |
|---|---|---|
parentConversationId | string | The agent session's conversationId that triggered this MCP call |
parentAgentId | string | The agent UUID that made the call |
parentRequestId | string | The agent's request ID |
These fields are null for direct MCP calls (not triggered by an agent).
Query MCP Logs by Agent Session
bash
curl -s "https://api.universalapi.co/logs?parentConversationId={agentSessionId}" \
-H "Authorization: Bearer YOUR_TOKEN" | jqThis returns all MCP tool invocation logs correlated to a specific agent session, enabling drill-down from agent activity into individual tool call payloads.