---
title: "get a workflow's status and results(if completed & requested), wait if the workflow is still running"
method: POST
path: "/api/v1/workflow/getWithWait"
---

# get a workflow's status and results(if completed & requested), wait if the workflow is still running

`POST /api/v1/workflow/getWithWait`

## Request body

- WorkflowGetRequest
  - `workflowId` string, required
  - `workflowRunId` string
  - `needsResults` boolean
  - `waitTimeSeconds` integer

## Response `200`

successful operation

- WorkflowGetResponse
  - `workflowRunId` string, required
  - `workflowStatus` 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMEOUT' | 'TERMINATED' | 'CANCELED' | 'CONTINUED_AS_NEW', required
  - `results` StateCompletionOutput[]
    - `completedStateId` string, required
    - `completedStateExecutionId` string, required
    - `completedStateOutput` EncodedObject
      - `extStoreId` string
      - `extPath` string
      - `encoding` string
      - `data` string
  - `errorType` 'STATE_DECISION_FAILING_WORKFLOW_ERROR_TYPE' | 'CLIENT_API_FAILING_WORKFLOW_ERROR_TYPE' | 'STATE_API_FAIL_ERROR_TYPE' | 'INVALID_USER_WORKFLOW_CODE_ERROR_TYPE' | 'RPC_ACQUIRE_LOCK_FAILURE' | 'SERVER_INTERNAL_ERROR_TYPE'
  - `errorMessage` string

## Other responses

- `400` — Invalid input
- `420` — wait has exceeded timeout

## Changes

> 50 revisions in range; 1 could not be searched.

- **2025-05-21** `66b9bf759281` — 1 info
  - removed the `STATE_API_FAIL_MAX_OUT_RETRY_ERROR_TYPE` enum value from the `errorType` response property for the response status `200`
- **2025-02-04** `f214e9d70d66` — 1 warning
  - added the new `STATE_API_FAIL_ERROR_TYPE` enum value to the `errorType` response property for the response status `200`
- **2023-08-25** `8c4dd5f2b718` — 1 warning
  - added the new `RPC_ACQUIRE_LOCK_FAILURE` enum value to the `errorType` response property for the response status `200`
- **2023-07-05** `b341064dfc4b` — 1 warning, 1 info
  - added the new `LONG_POLL_TIME_OUT_SUB_STATUS` enum value to the `subStatus` response property for the response status `400`
  - added the non-success response with the status `420`
- **2023-04-15** `86630172940f` — 1 warning, 3 info
  - added the new `WORKER_API_ERROR` enum value to the `subStatus` response property for the response status `400`
  - added the optional property `originalWorkerErrorDetail` to the response with the `400` status
  - added the optional property `originalWorkerErrorStatus` to the response with the `400` status
  - added the optional property `originalWorkerErrorType` to the response with the `400` status

[Full history](https://skmtc.dev/indeedeng/apis/workflow-apis/changes/api/v1/workflow/getWithWait/post.md)

---

[API](https://skmtc.dev/indeedeng/apis/workflow-apis.md) · [All operations](https://skmtc.dev/indeedeng/apis/workflow-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/indeedeng/workflow-apis/revisions/fe9c7606824c/schema)
