Ir al contenido

Resumir las sesiones de un agente

GET/api/public/v1/agents/{agent_id}/sessions/summary

Returns four aggregates scoped to a single agent: total lifetime sessions, sessions active in the last 30 minutes, mean actions per session, and the single longest session's action count. Empty agents (no sessions) return all zeros, not 404.

Ventana de terminal
curl --fail-with-body -X GET 'https://app.openlatch.ai/api/public/v1/agents/<agent_id>/sessions/summary' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Rol en la organizaciónEste punto de conexión
ownerPermitido
adminPermitido
editorPermitido
viewerPermitido

Una clave tiene el rol que su propietario ocupa en la organización. Consulte Autenticación.

Ámbito de la clave de API: agents:read

ParámetroTipoDescripción
agent_idstringObligatorio.
CampoTipoDescripción
active_nowintegerSessions whose last_event_at is within the last 30 minutes.
avg_actions_per_sessionnumberMean event_count across every session for the agent (rounded to 1 decimal).
daily_action_countsarray of integerSummed event_count across every session for each of the last 7 UTC days, oldest first. Feeds the actions-per-session sparkline.
daily_session_countsarray of integerNumber of sessions whose first_event_at lands on each of the last 7 UTC days, oldest first.
longest_session_actionsintegerHighest event_count across every session for the agent.
total_sessionsinteger
{
"active_now": 0,
"avg_actions_per_session": 0,
"daily_action_counts": [
3
],
"daily_session_counts": [
3
],
"longest_session_actions": 0,
"total_sessions": 0
}