Listar Logs

Listar os logs de execução de workflow de um workspace, com filtros, nível de detalhe selecionável e paginação por cursor opaco. As execuções são excluídas definitivamente assim que ultrapassam a janela de retenção de logs do pagador, então uma execução mais antiga simplesmente não aparece, em vez de ser reportada como removida. A janela é de 30 dias a partir do início da execução no plano Free, ilimitada no Pro e no Team, e definida por organização no Enterprise, com uma sobrescrita opcional por workspace.

GET/api/v2/logs
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 cujos logs de execução devem ser retornados.

Tamanho1 <= length <= 128
workflowIds?string

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

triggers?string

Comma-separated, lowercase trigger types or webhook provider IDs. Matching is exact and case-sensitive; unknown values select no runs. An empty entry is rejected. The sentinel all disables this filter, even when listed with other values. At most 100 entries.

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
minDurationMs?integer

Duração total mínima de execução em milissegundos. Milissegundos inteiros de 0 a 2147483647; a duração armazenada é um inteiro de 32 bits, então um limite fracionário ou fora do intervalo é rejeitado.

Intervalo0 <= value <= 2147483647
maxDurationMs?integer

Duração total máxima de execução em milissegundos. Milissegundos inteiros de 0 a 2147483647; a duração armazenada é um inteiro de 32 bits, então um limite fracionário ou fora do intervalo é rejeitado.

Intervalo0 <= value <= 2147483647
minCost?number

Custo mínimo de execução em USD, de 0 a 1000000. Uma execução nunca é cobrada com um valor negativo, então um limite negativo é rejeitado em vez de tratado como um filtro que corresponde a todas as execuções.

Intervalo0 <= value <= 1000000
maxCost?number

Custo máximo de execução em USD, de 0 a 1000000. Uma execução nunca é cobrada com um valor negativo, então um limite negativo é rejeitado em vez de tratado como um filtro que corresponde a todas as execuções.

Intervalo0 <= value <= 1000000
model?string

Modelo de IA usado durante a execução.

details?string

Response detail level. full adds the workflow summary to every workflow run; a job run never carries one, whatever this is set to. includeTraceSpans=true and includeFinalOutput=true each imply full, so either one adds workflow even when details=basic is sent explicitly.

Padrão"basic"
Valor em"basic" | "full"
includeTraceSpans?boolean

Whether to include block-level trace spans. Implies details=full. Spans are pruned on their own retention schedule, so a run whose spans have aged out returns traceSpans: [] rather than an error, and a run that has not settled returns only the spans recorded so far, often none; check status. A page that includes spans or final output holds at most 25 runs and ends early once its runs' stored execution data reaches 16 MiB, so it can be shorter than limit; follow nextCursor for the rest.

includeFinalOutput?boolean

Whether to include the final workflow output. Implies details=full, so the workflow summary is present regardless of what details is set to. Shortens the page the same way includeTraceSpans does.

limit?integer

Máximo de entradas de log por página. Valores fora de 1–1000 são truncados e ajustados para dentro desse intervalo em vez de rejeitados. O padrão é 100.

Padrão100
cursor?string

Cursor opaco da página anterior. Devolva-o com a mesma ordenação e os mesmos filtros; apenas limit pode mudar. Altere qualquer outra coisa e a paginação precisa recomeçar sem cursor.

Tamanho1 <= length
status?string

Comma-separated execution statuses to include, from pending | running | paused | redacting | completed | failed | cancelled. An empty entry is rejected. ANDed with level, which reports severity rather than lifecycle.

workflowName?string

Case-insensitive substring match against the run's workflow name. Runs whose workflow has been deleted match nothing, because the name is no longer joinable.

Tamanho1 <= length <= 200
includeJobRuns?boolean

Include Chat and Studio-agent jobs alongside workflow runs. Jobs use kind: "job" and have no workflow or cost ledger. Workflow, folder, model, or status filters exclude jobs. This option is valid only when sorting by startedAt.

runId?string

Identificador exato da execução a corresponder.

Corresponde a^[A-Za-z0-9._:-]+$
Tamanho1 <= length <= 128
sortBy?string

Field used to sort the result. durationMs and cost are null until a run settles; those runs sort before recorded values in ascending order and after them in descending order. Only startedAt can order Chat and Studio-agent job runs, so any other value is rejected when job runs are included.

Padrão"startedAt"
Valor em"startedAt" | "durationMs" | "cost" | "status"
sortOrder?string

Direção da ordenação.

Padrão"desc"
Valor em"asc" | "desc"
folderPaths?string

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

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?workspaceId=string" \  -H "X-API-Key: YOUR_API_KEY"
{
  "data": [
    {
      "kind": "workflow",
      "runId": "e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13",
      "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
      "deploymentVersionId": "dep_2c4e6a8b0d1f",
      "status": "completed",
      "level": "info",
      "trigger": "api",
      "startedAt": "2026-01-15T10:30:00.000Z",
      "endedAt": "2026-01-15T10:30:01.250Z",
      "totalDurationMs": 1250,
      "cost": {
        "total": 0.0032
      },
      "files": [
        {
          "id": "f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04",
          "name": "summary.pdf",
          "size": 18422,
          "type": "application/pdf",
          "downloadPath": "/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13/files/f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04"
        }
      ]
    }
  ],
  "nextCursor": "eyJzdGFydGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwMFoifQ=="
}
{
  "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"
  }
}