> ## 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.

# Diff Block Versions

Compare two immutable workflow block versions.

```python Python theme={null}
from_block_version_id = "bkv_before"
to_block_version_id = "bkv_after"
print(from_block_version_id, to_block_version_id)
```

```typescript TypeScript theme={null}
const fromBlockVersionId = "bkv_before";
const toBlockVersionId = "bkv_after";
console.log(fromBlockVersionId, toBlockVersionId);
```

```go Go theme={null}
fromBlockVersionID := "bkv_before"
toBlockVersionID := "bkv_after"
_, _ = fromBlockVersionID, toBlockVersionID
```

```java Java theme={null}
String fromBlockVersionId = "bkv_before";
String toBlockVersionId = "bkv_after";
System.out.println(fromBlockVersionId + " " + toBlockVersionId);
```

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


## OpenAPI

````yaml GET /v1/workflows/blocks/versions/diff
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/workflows/blocks/versions/diff:
    get:
      tags:
        - Workflows
        - Workflow Blocks
      summary: Diff Block Versions
      operationId: diff_block_versions
      parameters:
        - in: query
          name: from_block_version_id
          required: true
          schema:
            type: string
            title: From Block Version Id
        - in: query
          name: to_block_version_id
          required: true
          schema:
            type: string
            title: To Block Version Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowBlockVersionDiff'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkflowBlockVersionDiff:
      properties:
        from_block_version_id:
          type: string
          title: From Block Version Id
        to_block_version_id:
          type: string
          title: To Block Version Id
        block_id:
          type: string
          title: Block Id
        changes:
          items:
            $ref: '#/components/schemas/WorkflowVersionFieldDiff'
          type: array
          title: Changes
          default: []
      type: object
      required:
        - block_id
        - from_block_version_id
        - to_block_version_id
      title: WorkflowBlockVersionDiff
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          default: []
      type: object
      title: HTTPValidationError
    WorkflowVersionFieldDiff:
      properties:
        field:
          type: string
          title: Field
        from_value:
          anyOf:
            - {}
            - type: 'null'
          title: From Value
        to_value:
          anyOf:
            - {}
            - type: 'null'
          title: To Value
      type: object
      required:
        - field
      title: WorkflowVersionFieldDiff
      description: One changed field between two immutable version resources.
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````