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

# Download Execution Definition

Retrieve what a specific execution actually ran — its own snapshot, or, for one without a snapshot, the live
definition in its revision.

## **POST** `/revisions/:id/data/query` (Command: `download_execution_definition`)

### Request Body

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `command` | string | Yes | Must be `download_execution_definition`. |
| `execution_id` | string | Yes | The ID of the execution. |

Runs on the execution's own revision.

### Response

| Parameter | Type | Description |
| :- | :- | :- |
| `workflow` | object | The `workflow` object of the request that created the execution, verbatim. |
| `definition` | object | What it resolved to — see [Get Execution](/blob-types/workflow/operations/get-execution#execution-object). |
| `snapshot` | string | `"created"` or `"backfilled"`; absent if this execution has none. |
| `definition_object` | object | The snapshot, or — for an execution with no snapshot — the live definition in the execution's revision. |

For an execution without a snapshot, this answers from the live definition exactly as
[Download Definition](/blob-types/workflow/operations/download-definition) does, including a 403 if that
definition is gone — so a client needs no separate branch for older executions.

Unlike Download Definition, which reads a definition directly by id on a revision you can read, this reads what
a *specific execution actually ran*, wherever it came from. See
[The execution snapshot](/blob-types/workflow/workflows/execution-snapshot).

### Errors

| Status | Error | Cause |
| :- | :- | :- |
| 403 | `forbidden` | The execution is outside the route's revision, or (for one with no snapshot) its live definition is gone. |

### Example

<CodeGroup>
  ```json Request theme={null}
  {
    "command": "download_execution_definition",
    "execution_id": "exec_001"
  }
  ```

  ```json Response theme={null}
  {
    "status": "success",
    "workflow": { "definition": "data-process" },
    "definition": { "org_id": "org_001", "blob_id": "blob_001", "revision_id": "rev_001", "id": "def_001", "alias": "data-process" },
    "snapshot": "created",
    "definition_object": { "steps": [] }
  }
  ```
</CodeGroup>
