Get Log Statistics

Get run counts, success and error counts, and latency by workspace or workflow. Default bounds span recorded runs, or the last 24 hours when empty. Buckets may extend past the end. Folder filters include descendants; workflowsTruncated affects series, not totals. Expired runs are permanently deleted. Retention is 30 days from run start on Free, unlimited on Pro and Team, and configured per organization on Enterprise with workspace overrides. Workspace folder trees exceeding 10,000 folders return 413.

OAuth scope: api:read.

GET/api/v2/logs/stats
X-API-Key<token>

Sua API key do Studio, pessoal ou com escopo de workspace. Gere uma em Settings e depois API Keys. As operações que rejeitam API keys de workspace dizem isso na própria descrição.

Em: header

Parâmetros de query

workspaceId*string

Workspace whose execution statistics to summarize.

Tamanho1 <= length <= 128
workflowIds?string

Comma-separated workflow identifiers to include. At most 200 entries. An empty entry is rejected.

folderPaths?string

Comma-separated workflow folder paths, including descendants. Up to 100 paths. Unknown folder paths contribute no matches.

triggers?string

Comma-separated trigger types to include. An empty entry is rejected. The vocabulary is open, so an unrecognized member selects no runs; the literal all disables this filter.

level?string

Nível de severidade a incluir.

Valor em"info" | "error"
startDate?string

Incluir apenas as execuções iniciadas neste timestamp UTC ISO 8601 ou depois dele, por exemplo 2026-08-06T00:00:00Z. São rejeitados uma data sem hora, um timestamp que traga um offset UTC em vez de Z e o ano 0000, que não nomeia nenhum instante armazenável.

Corresponde a^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Formatodate-time
endDate?string

Incluir apenas as execuções iniciadas neste timestamp UTC ISO 8601 ou antes dele, por exemplo 2026-08-06T00:00:00Z. São rejeitados uma data sem hora, um timestamp que traga um offset UTC em vez de Z e o ano 0000, que não nomeia nenhum instante armazenável.

Corresponde a^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Formatodate-time
segmentCount?integer

Number of time buckets, up to 500. Exactly this many are returned, each at least one minute wide. Short windows extend past the requested end and include empty trailing buckets.

Padrão72
Intervalo1 <= value <= 500

Corpo da resposta

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://agent-studio.seeyu.ai/api/v2/logs/stats?workspaceId=string" \  -H "X-API-Key: YOUR_API_KEY"
{
  "data": {
    "workflows": [
      {
        "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
        "workflowName": "Customer Support Agent",
        "segments": [
          {
            "timestamp": "2026-01-15T10:00:00.000Z",
            "totalExecutions": 40,
            "successfulExecutions": 38,
            "avgDurationMs": 1180
          }
        ],
        "totalExecutions": 40,
        "totalSuccessful": 38,
        "overallSuccessRate": 95
      }
    ],
    "workflowsTruncated": false,
    "aggregateSegments": [
      {
        "timestamp": "2026-01-15T10:00:00.000Z",
        "totalExecutions": 40,
        "successfulExecutions": 38,
        "avgDurationMs": 1180
      }
    ],
    "totalRuns": 40,
    "totalErrors": 2,
    "avgLatency": 1180,
    "timeBounds": {
      "start": "2026-01-15T10:00:00.000Z",
      "end": "2026-01-15T22:00:00.000Z"
    },
    "segmentMs": 600000
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid request"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Insufficient workspace permissions",
    "details": {
      "code": "INSUFFICIENT_WORKSPACE_ROLE"
    }
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "PAYLOAD_TOO_LARGE",
    "message": "Request body is too large"
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "API rate limit exceeded",
    "details": {
      "retryAfter": "2026-01-01T00:00:30.000Z"
    }
  }
}
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  }
}
{
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Service temporarily unavailable"
  }
}