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

# Get Workflow Version Execution Results

Retrieve the execution results of a specific Workflow version. You can include all output nodes by setting the `return_all_outputs` query parameter to `true`.

| Status  | Meaning                                                                                               |
| ------- | ----------------------------------------------------------------------------------------------------- |
| **200** | Execution is **complete**. All nodes have reached a final status (`SUCCESS`, `FAILED`, or `SKIPPED`). |
| **202** | Execution is **still running**. At least one node is in a non-final status (`QUEUED` or `RUNNING`).   |

The response body schema is the same for both status codes. Poll until you receive a `200`.

<ResponseExample>
  ```json 200 (all) theme={null}
  {
    "Node 1": {
      "status": "SUCCESS",
      "value": "First node result",
      "error_message": null,
      "raw_error_message": null,
      "is_output_node": false
    },
    "Node 2": {
      "status": "SUCCESS",
      "value": "Final result",
      "error_message": null,
      "raw_error_message": null,
      "is_output_node": true
    }
  }
  ```

  ```json 200 (output_node) theme={null}
  "Final result"
  ```

  ```json 202 theme={null}
  {
    "Node 1": {
      "status": "SUCCESS",
      "value": "First node result",
      "error_message": null,
      "raw_error_message": null,
      "is_output_node": false
    },
    "Node 2": {
      "status": "RUNNING",
      "value": null,
      "error_message": null,
      "raw_error_message": null,
      "is_output_node": true
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /workflow-version-execution-results
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /workflow-version-execution-results:
    get:
      tags:
        - workflow
      summary: Get Workflow Version Execution Results
      operationId: getWorkflowVersionExecutionResults
      parameters:
        - name: workflow_version_execution_id
          in: query
          required: true
          schema:
            type: integer
            format: int64
          description: >-
            The unique identifier of the workflow version execution whose
            results you want to retrieve.
        - name: return_all_outputs
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            When set to true, the response includes all output nodes' results.
            If omitted or set to false, only the main output is returned.
      responses:
        '200':
          description: Successful response with execution results.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    additionalProperties:
                      type: object
                      properties:
                        status:
                          type: string
                          description: The status of the node execution.
                        value:
                          description: The output value of the node.
                        error_message:
                          type: string
                          nullable: true
                          description: Error message if the node failed.
                        raw_error_message:
                          type: string
                          nullable: true
                          description: Raw error message if the node failed.
                        is_output_node:
                          type: boolean
                          description: Whether this node is an output node.
                  - description: >-
                      The main output value of the workflow execution when
                      return_all_outputs is false.
        '202':
          description: >-
            Execution is still in progress. At least one node is in a non-final
            status (QUEUED or RUNNING).
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    additionalProperties:
                      type: object
                      properties:
                        status:
                          type: string
                          description: The status of the node execution.
                        value:
                          description: The output value of the node.
                        error_message:
                          type: string
                          nullable: true
                          description: Error message if the node failed.
                        raw_error_message:
                          type: string
                          nullable: true
                          description: Raw error message if the node failed.
                        is_output_node:
                          type: boolean
                          description: Whether this node is an output node.
                  - description: >-
                      The main output value of the workflow execution when
                      return_all_outputs is false.
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - ApiKeyAuth: []
components:
  responses:
    ValidationError:
      description: Validation error - request parameters or body are invalid.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/HTTPValidationError'
              - $ref: '#/components/schemas/ErrorResponse'
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          default: false
          description: Indicates that the request failed.
        message:
          type: string
          description: Human-readable error message.
        error:
          type: string
          description: Machine-readable or fallback error message.
      additionalProperties: true
      description: >-
        Standard error response. Some legacy endpoints may return either message
        or error.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````