Skip to content

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
ParameterTypeDefaultDescription
resourceIdstringFilter by resource ID (agent or MCP server UUID). Uses efficient GSI lookup.
timeRangenumber24Hours to look back
pageSizenumber50Results per page
pagenumber0Page number
statusstringFilter: success, error, timeout

Get All Logs

bash
curl -s "https://api.universalapi.co/logs" \
  -H "Authorization: Bearer YOUR_TOKEN" | jq

Get Request Details

bash
curl -s "https://api.universalapi.co/logs/req-xxx" \
  -H "Authorization: Bearer YOUR_TOKEN" | jq

Returns 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:

FieldTypeDescription
parentConversationIdstringThe agent session's conversationId that triggered this MCP call
parentAgentIdstringThe agent UUID that made the call
parentRequestIdstringThe 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" | jq

This returns all MCP tool invocation logs correlated to a specific agent session, enabling drill-down from agent activity into individual tool call payloads.

Universal API - The agentic entry point to the universe of APIs