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

# Get Edges

> Endpoint to retrieve all edges.
If version_number is not provided but workflow_id is, defaults to the workflow's active_version_number.



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/workflows/api.json get /workflows/v1/edges
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/edges:
    get:
      tags:
        - Edges
      summary: Get Edges
      description: >-
        Endpoint to retrieve all edges.

        If version_number is not provided but workflow_id is, defaults to the
        workflow's active_version_number.
      operationId: workflow_service_get_edges_v1_edges_get
      parameters:
        - name: filters
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/EdgeFilter'
        - name: size
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Number of items per page
            default: 300
            title: Size
          description: Number of items per page
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search keywords
            title: Search
          description: Search keywords
        - name: start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by start time (ISO 8601 format)
            title: Start
          description: Filter by start time (ISO 8601 format)
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by end time (ISO 8601 format)
            title: End
          description: Filter by end time (ISO 8601 format)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EdgesListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearer: []
components:
  schemas:
    EdgeFilter:
      properties:
        logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Logical Id
          description: Filter by logical ID
        workflow_id:
          anyOf:
            - $ref: '#/components/schemas/PydanticObjectId'
            - type: 'null'
          description: Filter by workflow ID
        type:
          anyOf:
            - $ref: '#/components/schemas/EdgeType'
            - type: 'null'
          description: Filter by edge type
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version Number
          description: Filter by version number. Returns snapshot edges for that version.
      type: object
      title: EdgeFilter
    EdgesListResponse:
      properties:
        edges:
          items:
            $ref: '#/components/schemas/EdgesModel'
          type: array
          title: Edges
          description: List of edges
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
          description: Total number of edges available without pagination.
      type: object
      title: EdgesListResponse
      description: |-
        Response model for a list of edges.
        Contains a list of EdgesModel objects.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    EdgeType:
      type: string
      enum:
        - direct
        - conditional
        - companion
      title: EdgeType
    EdgesModel:
      properties:
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          description: ID of the team that owns this edge
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          description: ID of the user who created this edge
        updated_by:
          anyOf:
            - type: string
            - type: 'null'
          description: ID of the user who last updated this edge
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        _id:
          anyOf:
            - $ref: '#/components/schemas/PydanticObjectId'
            - type: 'null'
          description: MongoDB document ObjectID
        edge_config:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/DirectEdgeConfig-Output'
                - $ref: '#/components/schemas/ConditionalEdgeConfig-Output'
                - $ref: '#/components/schemas/CompanionEdgeConfig-Output'
              discriminator:
                propertyName: type
                mapping:
                  companion:
                    $ref: '#/components/schemas/CompanionEdgeConfig-Output'
                  conditional:
                    $ref: '#/components/schemas/ConditionalEdgeConfig-Output'
                  direct:
                    $ref: '#/components/schemas/DirectEdgeConfig-Output'
            - type: 'null'
          title: Edge Config
          description: Edge Configuration
      type: object
      title: EdgesModel
      description: Stores an edge configuration present in the workflow system.
    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
    DirectEdgeConfig-Output:
      properties:
        logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Logical ID
          description: Unique identifier for the edge
          input_field_disallowed: true
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Name
          description: Name of the edge
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Description
          description: Description of the edge
        workflow_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow DB Object ID
          description: The DB Object ID of the workflow this entity belongs to
          input_field_not_visible: true
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Workflow Version Number
          description: >-
            Version number of the workflow this entity belongs to. 0 is the
            initial version (default).
          default: 0
          input_field_not_visible: true
        disabled:
          type: boolean
          title: Disabled
          description: >-
            If true, this entity will be disabled and will not execute its
            function. Useful for testing workflows without actually executing
            this specific entity
          default: false
        miscellaneous:
          additionalProperties: true
          type: object
          title: Miscellaneous Config
          description: Miscellaneous config data that can be used by the entity
          field_visibility_level: super_admin
        source_node_logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Node Logical ID
          description: Logical ID of the source node for this edge
          input_field_not_visible: true
        destination_node_logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Destination Node Logical ID
          description: Logical ID of the target node for this edge
          input_field_not_visible: true
        type:
          type: string
          const: direct
          title: Edge Type
          description: >-
            Type of the edge. Expected to be always 'direct' for this base
            config
          default: direct
      type: object
      title: Direct Edge
    ConditionalEdgeConfig-Output:
      properties:
        logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Logical ID
          description: Unique identifier for the edge
          input_field_disallowed: true
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Name
          description: Name of the edge
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Description
          description: Description of the edge
        workflow_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow DB Object ID
          description: The DB Object ID of the workflow this entity belongs to
          input_field_not_visible: true
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Workflow Version Number
          description: >-
            Version number of the workflow this entity belongs to. 0 is the
            initial version (default).
          default: 0
          input_field_not_visible: true
        disabled:
          type: boolean
          title: Disabled
          description: >-
            If true, this entity will be disabled and will not execute its
            function. Useful for testing workflows without actually executing
            this specific entity
          default: false
        miscellaneous:
          additionalProperties: true
          type: object
          title: Miscellaneous Config
          description: Miscellaneous config data that can be used by the entity
          field_visibility_level: super_admin
        source_node_logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Node Logical ID
          description: Logical ID of the source node for this edge
          input_field_not_visible: true
        destination_node_logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Destination Node Logical ID
          description: Logical ID of the target node for this edge
          input_field_not_visible: true
        type:
          type: string
          const: conditional
          title: Edge Type
          description: >-
            Type of the edge. Expected to be always 'conditional' for this
            config
          default: conditional
        condition:
          anyOf:
            - $ref: '#/components/schemas/ConditionConfig'
            - type: 'null'
          title: Edge Condition
          description: Condition that determines whether this edge is taken
      type: object
      title: Conditional Edge
    CompanionEdgeConfig-Output:
      properties:
        logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Logical ID
          description: Unique identifier for the edge
          input_field_disallowed: true
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Name
          description: Name of the edge
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Edge Description
          description: Description of the edge
        workflow_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow DB Object ID
          description: The DB Object ID of the workflow this entity belongs to
          input_field_not_visible: true
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Workflow Version Number
          description: >-
            Version number of the workflow this entity belongs to. 0 is the
            initial version (default).
          default: 0
          input_field_not_visible: true
        disabled:
          type: boolean
          title: Disabled
          description: >-
            If true, this entity will be disabled and will not execute its
            function. Useful for testing workflows without actually executing
            this specific entity
          default: false
        miscellaneous:
          additionalProperties: true
          type: object
          title: Miscellaneous Config
          description: Miscellaneous config data that can be used by the entity
          field_visibility_level: super_admin
        source_node_logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Node Logical ID
          description: Logical ID of the source node for this edge
          input_field_not_visible: true
        destination_node_logical_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Destination Node Logical ID
          description: Logical ID of the target node for this edge
          input_field_not_visible: true
        type:
          type: string
          const: companion
          title: Edge Type
          description: Type of the edge. Expected to be always 'companion' for this config
          default: companion
      type: object
      title: Companion Edge
    ConditionConfig:
      properties:
        condition_freeform:
          anyOf:
            - type: string
            - type: 'null'
          title: Freeform condition string
          description: >-
            Condition (expressed in natural language) that determines whether
            this path is taken
          input_field_type: textarea
        condition_expression:
          anyOf:
            - type: string
            - type: 'null'
          title: Expression condition string
          description: >-
            Condition (expressed in a structured equation with variables) that
            determines whether this path is taken
        args_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Arguments JSON Schema
          description: >-
            JSON Schema describing the arguments that will be passed when
            condition_freeform is evaluated
          input_field_type: textarea
        static_messages_config:
          anyOf:
            - $ref: '#/components/schemas/StaticMessagesConfig'
            - type: 'null'
          title: Static Messages Configuration
          description: >-
            Static messages that an LLM node should emit while this tool is
            being invoked
        dynamic_messages_config:
          anyOf:
            - $ref: '#/components/schemas/DynamicMessagesConfig'
            - type: 'null'
          title: Dynamic Messages Configuration
          description: >-
            Dynamic message configuration. When set, the LLM will generate a
            message to say when this edge is taken, guided by the provided
            prompt.
      type: object
      title: ConditionConfig
    StaticMessagesConfig:
      properties:
        static_messages:
          items:
            type: string
          type: array
          title: Static Messages
          description: List of pre-configured messages from which one will be emitted
        static_messages_selection_mode:
          anyOf:
            - $ref: '#/components/schemas/SelectionMode'
            - type: 'null'
          title: Static Messages Selection Mode
          description: Selection mode for static messages
          default: random
      type: object
      title: StaticMessagesConfig
    DynamicMessagesConfig:
      properties:
        dynamic_message_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Dynamic Message Prompt
          description: >-
            A prompt describing what the LLM should say when this conditional
            edge is taken. The LLM will be asked to fill in a value based on
            this prompt, and the result will be emitted as an assistant
            response.
          input_field_type: textarea
      type: object
      title: DynamicMessagesConfig
    SelectionMode:
      type: string
      enum:
        - random
        - sequence
      title: SelectionMode
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````