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

# Compare Workflow Versions

> Compare two workflow versions and return a detailed diff.

Args:
    workflow_id: The workflow ID
    version1_number: First version number (typically the older version)
    version2_number: Second version number (typically the newer version)

Returns:
    VersionDiffResponse with workflow config changes, node changes, and edge changes



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/workflows/api.json get /workflows/v1/workflows/{workflow_id}/versions/{version1_number}/diff/{version2_number}
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /workflows/v1/workflows/{workflow_id}/versions/{version1_number}/diff/{version2_number}:
    get:
      tags:
        - Workflow Versions
      summary: Compare Workflow Versions
      description: |-
        Compare two workflow versions and return a detailed diff.

        Args:
            workflow_id: The workflow ID
            version1_number: First version number (typically the older version)
            version2_number: Second version number (typically the newer version)

        Returns:
            VersionDiffResponse with workflow config changes, node changes, and edge changes
      operationId: >-
        workflow_service_compare_workflow_versions_v1_workflows__workflow_id__versions__version1_number__diff__version2_number__get
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/PydanticObjectId'
        - name: version1_number
          in: path
          required: true
          schema:
            type: integer
            title: Version1 Number
        - name: version2_number
          in: path
          required: true
          schema:
            type: integer
            title: Version2 Number
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VersionDiffResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearer: []
components:
  schemas:
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    VersionDiffResult:
      properties:
        version1_number:
          type: integer
          title: Version1 Number
        version1_name:
          type: string
          title: Version1 Name
        version2_number:
          type: integer
          title: Version2 Number
        version2_name:
          type: string
          title: Version2 Name
        workflow_config_changes:
          items:
            $ref: '#/components/schemas/FieldDiff'
          type: array
          title: Workflow Config Changes
          default: []
        nodes:
          items:
            $ref: '#/components/schemas/NodeDiff'
          type: array
          title: Nodes
          default: []
        edges:
          items:
            $ref: '#/components/schemas/EdgeDiff'
          type: array
          title: Edges
          default: []
        summary:
          additionalProperties:
            type: integer
          type: object
          title: Summary
          default: {}
      type: object
      required:
        - version1_number
        - version1_name
        - version2_number
        - version2_name
      title: VersionDiffResult
      description: Complete diff result between two versions.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FieldDiff:
      properties:
        path:
          type: string
          title: Path
        old_value:
          title: Old Value
        new_value:
          title: New Value
      type: object
      required:
        - path
      title: FieldDiff
      description: Represents a single field change.
    NodeDiff:
      properties:
        logical_id:
          type: string
          title: Logical Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        node_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Node Type
        status:
          type: string
          enum:
            - added
            - removed
            - modified
          title: Status
        changes:
          items:
            $ref: '#/components/schemas/FieldDiff'
          type: array
          title: Changes
          default: []
      type: object
      required:
        - logical_id
        - status
      title: NodeDiff
      description: Represents changes to a node between versions.
    EdgeDiff:
      properties:
        logical_id:
          type: string
          title: Logical Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        edge_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Type
        status:
          type: string
          enum:
            - added
            - removed
            - modified
          title: Status
        changes:
          items:
            $ref: '#/components/schemas/FieldDiff'
          type: array
          title: Changes
          default: []
      type: object
      required:
        - logical_id
        - status
      title: EdgeDiff
      description: Represents changes to an edge between versions.
    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
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````