Obter Execução de Workflow

Obter o estado atual da execução de um workflow, opcionalmente incluindo as saídas finais e as saídas dos blocks.

GET/api/v2/workflows/{workflowId}/runs/{runId}
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 path

workflowId*string

Identificador único do workflow.

Tamanho1 <= length
runId*string

Identificador único da execução de workflow.

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

Parâmetros de query

includeOutput?boolean

Incluir a saída final do workflow quando true. Isso não controla blockOutputs, que selectedOutputs seleciona por conta própria.

selectedOutputs?string

Comma-separated block output references to include, as blockId or blockId.path. Block names are not resolved here — unlike the execute request, this resource reads a recorded run and matches ids only, so a selector that is not headed by a block id answers 400 instead of an empty blockOutputs.

includeFileBase64?boolean

Inline each produced file's bytes as base64. Requires includeOutput. A file above the inline ceiling answers 413 naming its download path; fetch large files from downloadPath instead.

base64MaxBytes?integer

Per-file inline ceiling, lowering but never raising the server limit of 16 MiB.

Intervalo1 <= value <= 16777216

Corpo da resposta

application/json

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/workflows/string/runs/run_8f14e45f-ceea-467f-a" \  -H "X-API-Key: YOUR_API_KEY"
{
  "data": {
    "runId": "run_8f14e45f-ceea-467f-a",
    "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
    "status": "completed",
    "trigger": "api",
    "startedAt": "2026-08-09T18:04:10.000Z",
    "endedAt": "2026-08-09T18:04:11.000Z",
    "durationMs": 1000,
    "paused": null,
    "cost": {
      "total": 12
    },
    "error": null,
    "output": {
      "result": "Ticket routed to Support"
    },
    "blockOutputs": null,
    "files": [
      {
        "id": "file_1a2b3c",
        "name": "summary.pdf",
        "size": 20480,
        "type": "application/pdf",
        "downloadPath": "/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/run_8f14e45f-ceea-467f-a/files/file_1a2b3c",
        "base64": null
      }
    ]
  }
}
{
  "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": "CONFLICT",
    "message": "Webhook path already in use"
  }
}
{
  "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"
  }
}