> ## Documentation Index
> Fetch the complete documentation index at: https://uiform-codex-generated-frontend-snippets.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Workflow Versions

List immutable workflow graph versions.

```python Python theme={null}
workflow_id = "wf_abc123"
print(workflow_id)
```

```typescript TypeScript theme={null}
const workflowId = "wf_abc123";
console.log(workflowId);
```

```go Go theme={null}
workflowID := "wf_abc123"
_ = workflowID
```

```java Java theme={null}
String workflowId = "wf_abc123";
System.out.println(workflowId);
```

```bash cURL theme={null}
curl "https://api.retab.com/v1/workflows/versions?workflow_id=wf_abc123" \
  -H "Authorization: Bearer $RETAB_API_KEY"
```


## OpenAPI

````yaml GET /v1/workflows/versions
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/workflows/versions:
    get:
      tags:
        - Workflows
        - Workflow Versions
      summary: List Workflow Versions
      operationId: list_workflow_versions
      parameters:
        - in: query
          name: workflow_id
          required: true
          schema:
            type: string
            description: Workflow whose versions to list
            title: Workflow Id
          description: Workflow whose versions to list
        - in: query
          name: before
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Workflow version cursor before
            title: Before
          required: false
          description: Workflow version cursor before
        - in: query
          name: after
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Workflow version cursor after
            title: After
          required: false
          description: Workflow version cursor after
        - in: query
          name: limit
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Maximum number of versions to return
            default: 50
            title: Limit
          required: false
          description: Maximum number of versions to return
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowGraphVersionList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkflowGraphVersionList:
      description: >-
        A page of `WorkflowGraphVersion` resources. `data` holds the items and
        `list_metadata` carries the `before`/`after` cursors; pass `after` to
        fetch the next page.
      properties:
        data:
          items:
            $ref: '#/components/schemas/WorkflowGraphVersion'
          type: array
          title: Data
        list_metadata:
          $ref: '#/components/schemas/ListMetadata'
      type: object
      required:
        - data
        - list_metadata
      title: WorkflowGraphVersionList
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          default: []
      type: object
      title: HTTPValidationError
    WorkflowGraphVersion:
      properties:
        id:
          type: string
          title: Id
          description: Public content-addressed workflow version ID
        workflow_id:
          type: string
          title: Workflow Id
        blocks:
          items:
            $ref: '#/components/schemas/WorkflowConfigBlock'
          type: array
          title: Blocks
          default: []
        edges:
          items:
            $ref: '#/components/schemas/WorkflowConfigEdge'
          type: array
          title: Edges
          default: []
        block_version_ids:
          items:
            type: string
          type: array
          title: Block Version Ids
          default: []
        edge_version_ids:
          items:
            type: string
          type: array
          title: Edge Version Ids
          default: []
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - created_at
        - id
        - workflow_id
      title: WorkflowGraphVersion
      description: Public workflow version resource without tenant fields.
    ListMetadata:
      properties:
        before:
          anyOf:
            - type: string
            - type: 'null'
          title: Before
        after:
          anyOf:
            - type: string
            - type: 'null'
          title: After
      type: object
      required:
        - after
        - before
      title: ListMetadata
      description: Boundary resource IDs for page navigation.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
          default: null
        ctx:
          type: object
          title: Context
          default: {}
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    WorkflowConfigBlock:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          enum:
            - start_document
            - start_json
            - note
            - parse
            - edit
            - extract
            - split
            - classifier
            - conditional
            - api_call
            - function
            - while_loop
            - for_each
            - merge_dicts
            - while_loop_sentinel_start
            - while_loop_sentinel_end
            - for_each_sentinel_start
            - for_each_sentinel_end
          title: Type
        position:
          $ref: '#/components/schemas/WorkflowBlockPosition'
        label:
          type: string
          title: Label
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
          description: Block-specific configuration
        resolved_schemas:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Resolved Schemas
          description: >-
            Derived schema transport sidecar for UI/runtime consumers. Not
            authored config.
        width:
          anyOf:
            - type: number
            - type: 'null'
          title: Width
          description: Block width for resizable blocks
        height:
          anyOf:
            - type: number
            - type: 'null'
          title: Height
          description: Block height for resizable blocks
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
          description: ID of parent container block (while_loop, for_each)
      type: object
      required:
        - label
        - position
        - type
      title: WorkflowConfigBlock
    WorkflowConfigEdge:
      properties:
        id:
          type: string
          title: Id
        source:
          type: string
          title: Source
          description: ID of the source block
        target:
          type: string
          title: Target
          description: ID of the target block
        source_handle:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Handle
        target_handle:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Handle
        animated:
          type: boolean
          title: Animated
          default: true
      type: object
      required:
        - source
        - target
      title: WorkflowConfigEdge
    WorkflowBlockPosition:
      properties:
        x:
          type: number
          title: X
        'y':
          type: number
          title: 'Y'
      type: object
      required:
        - x
        - 'y'
      title: WorkflowBlockPosition
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````