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

# Get Flow By Id

> Get a single flow by ID.

Args:
    flow_id: The workflow flow ID.
    auth_context: Authentication context.
    session: Database session.

Returns:
    Flow details.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/workflow/{flow_id}
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/workflow/{flow_id}:
    get:
      tags:
        - Workflows
      summary: Get Flow By Id
      description: |-
        Get a single flow by ID.

        Args:
            flow_id: The workflow flow ID.
            auth_context: Authentication context.
            session: Database session.

        Returns:
            Flow details.
      operationId: get_flow_by_id_v1_workflow__flow_id__get
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowAllResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    FlowAllResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        created:
          type: string
          format: date-time
          title: Created
        updated:
          type: string
          format: date-time
          title: Updated
        status:
          anyOf:
            - $ref: '#/components/schemas/FlowStatus'
            - type: 'null'
        flow_category:
          anyOf:
            - $ref: '#/components/schemas/FlowCategory'
            - type: 'null'
        trigger:
          anyOf:
            - $ref: '#/components/schemas/TriggerResponse'
            - type: 'null'
      type: object
      required:
        - id
        - created
        - updated
      title: FlowAllResponse
      description: Flow response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FlowStatus:
      type: string
      enum:
        - ENABLED
        - DISABLED
      title: FlowStatus
    FlowCategory:
      type: string
      enum:
        - post_call
        - during_call
        - pre_call
        - empty
      title: FlowCategory
    TriggerResponse:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        valid:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Valid
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        settings:
          anyOf:
            - $ref: '#/components/schemas/TriggerSettingsResponse'
            - type: 'null'
        nextAction:
          anyOf:
            - $ref: '#/components/schemas/StepResponse'
            - type: 'null'
      type: object
      title: TriggerResponse
      description: Trigger definition.
    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
    TriggerSettingsResponse:
      properties:
        pieceName:
          anyOf:
            - type: string
            - type: 'null'
          title: Piecename
        pieceVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Pieceversion
        triggerName:
          anyOf:
            - type: string
            - type: 'null'
          title: Triggername
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input
        propertySettings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Propertysettings
        sampleData:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Sampledata
      type: object
      title: TriggerSettingsResponse
      description: Trigger settings.
    StepResponse:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        valid:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Valid
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        skip:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Skip
        settings:
          anyOf:
            - $ref: '#/components/schemas/StepSettingsResponse'
            - type: 'null'
        children:
          anyOf:
            - items:
                $ref: '#/components/schemas/StepResponse'
              type: array
            - type: 'null'
          title: Children
        nextAction:
          anyOf:
            - $ref: '#/components/schemas/StepResponse'
            - type: 'null'
      type: object
      title: StepResponse
      description: Step/action (recursive).
    StepSettingsResponse:
      properties:
        pieceName:
          anyOf:
            - type: string
            - type: 'null'
          title: Piecename
        pieceVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Pieceversion
        actionName:
          anyOf:
            - type: string
            - type: 'null'
          title: Actionname
        triggerName:
          anyOf:
            - type: string
            - type: 'null'
          title: Triggername
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input
        propertySettings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Propertysettings
        sampleData:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Sampledata
        branches:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Branches
        executionType:
          anyOf:
            - type: string
            - type: 'null'
          title: Executiontype
      type: object
      title: StepSettingsResponse
      description: Step/action settings.
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````