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

# Get Workflow Details

> Retrieve the workflow object — name, status, nodes and edges

Before you can execute a case, you must know what inputs the workflow expects. This endpoint returns the workflow object: its name, status, and the full node/edge graph.

The workflow's input definitions live on the **input node**: look up `nodes[workflowInputNodeId].input_schema.schema` to get the variable names and types you need for the [Execute Case](/api-reference/v1-case/execute-case) `payload`.

By default, the response describes the latest version of the workflow. To inspect a specific historical version, pass either the `workflowVersionNumber` or the `workflowVersionId` UUID as a query parameter.

## Path Parameters

<ParamField path="workflowId" type="string" required>
  The unique identifier of the workflow to retrieve details for
</ParamField>

## Query Parameters

<ParamField query="workflowVersionNumber" type="number">
  Workflow version number to retrieve. Omit to use the latest version.
</ParamField>

<ParamField query="workflowVersionId" type="string">
  Specific workflow version UUID. Takes precedence over `workflowVersionNumber` when both are supplied.
</ParamField>

## Headers

<ParamField header="x-service-key" type="string" required>
  Your API authentication key
</ParamField>

## Response

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

<ResponseField name="workflowVersionId" type="string">
  The workflow version ID this object represents
</ResponseField>

<ResponseField name="workflowVersionNumber" type="number" required>
  The workflow version number this object represents
</ResponseField>

<ResponseField name="latestVersionNumber" type="number">
  The latest version number of the workflow
</ResponseField>

<ResponseField name="name" type="string" required>
  Workflow name
</ResponseField>

<ResponseField name="description" type="string">
  Workflow description
</ResponseField>

<ResponseField name="validityStatus" type="string">
  Validity status of the workflow
</ResponseField>

<ResponseField name="activeStatus" type="string">
  Active status of the workflow
</ResponseField>

<ResponseField name="workflowInputNodeId" type="string">
  ID of the workflow input node — its entry in `nodes` carries the input schema for [Execute Case](/api-reference/v1-case/execute-case)
</ResponseField>

<ResponseField name="workflowOutputNodeId" type="string">
  ID of the workflow output node — its entry in `nodes` defines the output variables returned by [Get Case Results](/api-reference/v1-case/get-case-results)
</ResponseField>

<ResponseField name="startingNodeIds" type="string[]" required>
  IDs of the starting nodes
</ResponseField>

<ResponseField name="endingNodeIds" type="string[]" required>
  IDs of the ending nodes
</ResponseField>

<ResponseField name="nodes" type="object" required>
  The workflow nodes keyed by node ID. Node objects use snake\_case keys — the input node's `input_schema.schema` maps variable names to their definitions (`type`, `display_name`, `type_definition`, …).
</ResponseField>

<ResponseField name="edges" type="object" required>
  The workflow edges keyed by edge ID
</ResponseField>

<ResponseField name="lastRun" type="string">
  ISO timestamp of the workflow's most recent execution. `null` if never run.
</ResponseField>

## Errors

<ResponseField name="401" type="Unauthorized">
  Missing, invalid, or expired API key.
</ResponseField>

<ResponseField name="404" type="Not Found">
  The workflow does not exist.
</ResponseField>

## Supported Data Types

| Type          | Description        | Example Value                  |
| ------------- | ------------------ | ------------------------------ |
| `str`         | Text string        | `"Hello World"`                |
| `float`       | Numeric value      | `45.8`                         |
| `bool`        | Boolean            | `true` or `false`              |
| `date`        | Date string        | `"2025-11-09"`                 |
| `file`        | Single file URL    | `"https://files.opus.com/..."` |
| `array`       | List of values     | `["item1", "item2"]`           |
| `array_files` | Multiple file URLs | `["url1", "url2"]`             |
| `object`      | Nested object      | `{"key": "value"}`             |

<RequestExample>
  ```bash cURL theme={null}
  # Latest version
  curl --request GET \
    --url https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID} \
    --header 'x-service-key: {YOUR_SERVICE_KEY}'

  # Pinned to a specific version number
  curl --request GET \
    --url 'https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}?workflowVersionNumber=3' \
    --header 'x-service-key: {YOUR_SERVICE_KEY}'

  # Pinned to a specific version UUID
  curl --request GET \
    --url 'https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}?workflowVersionId={WORKFLOW_VERSION_ID}' \
    --header 'x-service-key: {YOUR_SERVICE_KEY}'
  ```

  ```python Python theme={null}
  import requests

  url = "https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}"
  headers = {"x-service-key": "{YOUR_SERVICE_KEY}"}

  # Latest version
  response = requests.get(url, headers=headers)

  # Or pin to a specific version
  # response = requests.get(url, headers=headers, params={"workflowVersionNumber": 3})
  # response = requests.get(url, headers=headers, params={"workflowVersionId": "{WORKFLOW_VERSION_ID}"})

  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  // Latest version
  const response = await fetch(
    "https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}",
    {
      method: "GET",
      headers: {
        "x-service-key": "{YOUR_SERVICE_KEY}",
      },
    }
  );

  // Or pin to a specific version
  // const url = new URL("https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}");
  // url.searchParams.set("workflowVersionNumber", "3");
  // const response = await fetch(url, { headers: { "x-service-key": "{YOUR_SERVICE_KEY}" } });

  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Response theme={null}
  {
    "workflowId": "{WORKFLOW_ID}",
    "workflowVersionId": "{WORKFLOW_VERSION_ID}",
    "workflowVersionNumber": 3,
    "latestVersionNumber": 3,
    "name": "Quarterly Report Processor",
    "description": "Summarizes quarterly financial reports",
    "validityStatus": "valid",
    "activeStatus": "active",
    "workflowInputNodeId": "{INPUT_NODE_ID}",
    "workflowOutputNodeId": "{OUTPUT_NODE_ID}",
    "startingNodeIds": ["{INPUT_NODE_ID}"],
    "endingNodeIds": ["{OUTPUT_NODE_ID}"],
    "nodes": {
      "{INPUT_NODE_ID}": {
        "id": "{INPUT_NODE_ID}",
        "name": "Workflow Input",
        "input_schema": {
          "schema": {
            "{VARIABLE_NAME_1}": {
              "display_name": "{DISPLAY_NAME}",
              "allowed_types": [{ "type": "str", "type_definition": null }]
            }
          }
        }
      }
    },
    "edges": {
      "{EDGE_ID}": {
        "from_node_id": "{INPUT_NODE_ID}",
        "to_node_id": "{OUTPUT_NODE_ID}"
      }
    },
    "lastRun": "2026-08-01T14:32:11Z"
  }
  ```
</ResponseExample>
