> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sarasfinance.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Workflow Runs

> Retrieve execution runs of workflows filtered by process, stage, workflow, or run ID.

### Query Parameters

<ParamField query="subProjectId" type="string" placeholder="sp_123" required>
  The unique identifier for the sub-project.
</ParamField>

<ParamField query="stageKey" type="string" placeholder="stage_init">
  Filter runs by stage key.
</ParamField>

<ParamField query="processId" type="string" placeholder="proc_123">
  Filter runs by process ID.
</ParamField>

<ParamField query="workflowId" type="string" placeholder="wf_123">
  Filter runs by workflow ID.
</ParamField>

<ParamField query="runId" type="string" placeholder="run_123">
  Retrieve a specific workflow run by ID.
</ParamField>

### Response

<ResponseField name="runs" type="object[]">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      The unique identifier for the run.
    </ResponseField>

    <ResponseField name="workflowId" type="string">
      The associated workflow ID.
    </ResponseField>

    <ResponseField name="processId" type="string">
      The associated process ID.
    </ResponseField>

    <ResponseField name="state" type="string">
      The status of the execution (e.g. `COMPLETED`, `PAUSED`, `FAILED`, `RACING`).
    </ResponseField>

    <ResponseField name="createdTs" type="string">
      ISO timestamp of run initialization.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl --location 'https://api.sarasfinance.com/v1/process/getWorkflowRuns?subProjectId=93d599a6-a396-4ef6-b30e-aff95c56c523&processId=ef341826-1cab-4680-aa52-efd001f9da00' \
  --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "runs": [
      {
        "id": "run_017b2c9a",
        "workflowId": "wf_b2a7590d",
        "processId": "ef341826-1cab-4680-aa52-efd001f9da00",
        "state": "COMPLETED",
        "createdTs": "2026-04-16T12:00:00Z"
      }
    ]
  }
  ```
</ResponseExample>

### Error Codes

| Code                                       | ID   | Description                    |
| :----------------------------------------- | :--- | :----------------------------- |
| `ERROR_PROCESS_META_IS_MISSING_IN_REQUEST` | 1200 | Metadata missing in request    |
| `ERROR_SUBPROCESS_META_NOT_FOUND`          | 1202 | Sub-project metadata not found |
| `ERROR_NOT_ALLOWED_TO_GET`                 | 1205 | User unauthorized to view data |
