curl --request GET \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/analytics \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"agent_id": "<string>",
"agent_name": "<string>",
"period": {
"type": "<string>",
"start": "<string>",
"end": "<string>",
"granularity": "<string>"
},
"summary": {},
"series": [
{
"date": "<string>",
"users": 123,
"conversations": 123,
"messages": 123,
"rating": 123,
"cost": 123,
"status": "incomplete"
}
],
"meta": {
"generated_at": "<string>",
"data_points": 123,
"includes_current_interval": true,
"summary_cached": true,
"data_computed_at": "<string>",
"next_refresh_at": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Get analytics (series + summary) for an agent
Returns metrics series and an aggregated summary for a single agent. Series is read from Mongo; summary is cached and recomputed from Elasticsearch on miss/stale (custom date ranges always recompute).
curl --request GET \
--url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/analytics \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"agent_id": "<string>",
"agent_name": "<string>",
"period": {
"type": "<string>",
"start": "<string>",
"end": "<string>",
"granularity": "<string>"
},
"summary": {},
"series": [
{
"date": "<string>",
"users": 123,
"conversations": 123,
"messages": 123,
"rating": 123,
"cost": 123,
"status": "incomplete"
}
],
"meta": {
"generated_at": "<string>",
"data_points": 123,
"includes_current_interval": true,
"summary_cached": true,
"data_computed_at": "<string>",
"next_refresh_at": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Authorizations
User-bound credential carrying an identity: either a session JWT
or a user access token (at:*) generated from the user settings UI.
Send as Authorization: Bearer <token>.
Org API keys (iak_*) are not accepted here - they carry
no user identity. Use the x-prismeai-api-key header instead
(see OrgApiKeyAuth).
Query Parameters
Response
Analytics payload.
Analytics payload (series + summary) for a single agent.
Aggregated KPIs (users, engagement, quality, performance, cost, models, tools). tools = {tool_calls, invalid_tool_names, : {calls}}; invalid_tool_names sums, over each name a model returned that is not a valid tool name, the completions that returned it (those names are left out of the per-tool list).
Was this page helpful?