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

# Recuperar un flujo

> Recupera información detallada sobre un flujo específico, incluida su configuración, lógica de ejecución, condiciones, destinos y métricas de ejecución. Devuelve los datos completos del flujo en el idioma solicitado.



## OpenAPI

````yaml /api-reference/openapi-v1.json get /v1/organizations/{organization_id}/flows/{flow_id}
openapi: 3.0.3
info:
  title: API Publica Portal
  version: 1.0.0
  description: Api publica REST para portal
servers:
  - url: https://api.staging.flxwvdexternal.com
    description: Staging API server
security:
  - bearerAuth: []
tags: []
paths:
  /v1/organizations/{organization_id}/flows/{flow_id}:
    get:
      tags:
        - Flujos
      summary: Recuperar un flujo
      description: >-
        Recupera información detallada sobre un flujo específico, incluida su
        configuración, lógica de ejecución, condiciones, destinos y métricas de
        ejecución. Devuelve los datos completos del flujo en el idioma
        solicitado.
      operationId: getFlowById
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: El identificador único de la organización
          example: 507f1f77bcf86cd799439011
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: El identificador único del flujo
          example: 507f1f77bcf86cd799439012
        - name: Accept-Language
          in: header
          required: false
          schema:
            type: string
            enum:
              - en-EN
              - es-ES
              - pt-BR
              - ca-ES
              - eu-ES
            default: es-ES
          description: >-
            Código de idioma para campos de texto que admiten varios idiomas. Al
            crear o actualizar recursos, esto especifica el idioma de los
            valores de texto proporcionados. Al recuperar recursos, esto
            determina qué variante de idioma de los campos de texto multilingües
            se devuelve. Valores aceptados: 'en-EN' (inglés), 'es-ES' (español),
            'pt-BR' (portugués), 'ca-ES' (catalán), 'eu-ES' (euskera). El valor
            predeterminado es 'es-ES' si no se proporciona.
      responses:
        '200':
          description: >-
            Detalles del flujo recuperados correctamente. La respuesta incluye
            la configuración completa del flujo, condiciones, destinos y
            métricas de ejecución.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowV1'
        '400':
          $ref: '#/components/responses/BadRequest'
          description: Solicitud incorrecta - ID de flujo no válido
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: No autorizado - se requiere autenticación
        '404':
          $ref: '#/components/responses/NotFound'
          description: Flujo no encontrado
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    FlowV1:
      type: object
      description: >-
        Detalle del flujo tal como lo devuelve GET flow by id. La organización
        está implícita por la ruta
        `/v1/organizations/{organization_id}/flows/{flow_id}`. Los
        workspaces/grupos de destino se normalizan en target.ids (cadenas
        hexadecimales de ObjectId de MongoDB).
      properties:
        id:
          type: string
          maxLength: 24
          pattern: ^[0-9a-f]{24}$
        created_at:
          type: string
          format: date-time
        name:
          type: string
          description: Resuelto para Accept-Language cuando es multilingüe
        description:
          type: string
          description: Resuelto para Accept-Language cuando es multilingüe
        type:
          type: string
          enum:
            - session
            - workspace
        version:
          type: number
        detection_only:
          type: boolean
        cooldown_minutes:
          type: number
          description: Tiempo de espera en minutos
        enabled:
          type: boolean
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FlowConditionV1'
          description: Omitido o vacío cuando el flujo no tiene condiciones
        trigger:
          type: string
          nullable: true
        target:
          $ref: '#/components/schemas/FlowTargetSelectorV1'
          description: >-
            Destino de ejecución: type selecciona el alcance; ids enumera
            valores de _id de Workspace, _id de grupo de Workspace o _id de
            Grupo de reporte (vacío cuando type es ALL_WORKSPACES)
        microservice_id:
          type: string
          nullable: true
          description: ID del microservicio vinculado cuando está presente
        init_text:
          type: string
          nullable: true
          description: Resuelto para Accept-Language cuando es multilingüe
        ok_text:
          type: string
          nullable: true
          description: Resuelto para Accept-Language cuando es multilingüe
        ko_text:
          type: string
          nullable: true
          description: Resuelto para Accept-Language cuando es multilingüe
        execution_metrics:
          $ref: '#/components/schemas/FlowExecutionMetricsV1'
          nullable: true
          description: Presente cuando se calcularon métricas para este flujo
      required:
        - id
        - created_at
        - name
        - description
        - type
        - version
        - detection_only
        - cooldown_minutes
        - enabled
        - target
    FlowConditionV1:
      type: object
      properties:
        condition_type_id:
          type: string
        metric:
          type: string
        operator:
          type: string
        compare_to:
          type: string
        period:
          type: number
          nullable: true
        check_every:
          type: number
      required:
        - condition_type_id
        - metric
        - operator
        - compare_to
        - check_every
    FlowTargetSelectorV1:
      type: object
      properties:
        type:
          type: string
          enum:
            - all_workspaces
            - workspaces
            - workspace_groups
            - reporting_groups
          description: >-
            ALL_WORKSPACES: ids siempre es []. WORKSPACES: ids son _id de
            documentos de Workspace (24 hex). WORKSPACE_GROUPS /
            REPORTING_GROUPS: ids son valores de _id de grupo.
        ids:
          type: array
          items:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
      required:
        - type
        - ids
    FlowExecutionMetricsV1:
      type: object
      properties:
        targeted_workspaces:
          type: number
        evaluations_per_day:
          type: number
        possible_executions_per_day:
          type: number
        total_possible_executions_per_day:
          type: number
      required:
        - targeted_workspaces
        - evaluations_per_day
        - possible_executions_per_day
        - total_possible_executions_per_day
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
  responses:
    BadRequest:
      description: Solicitud incorrecta
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: No autorizado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: No encontrado
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Demasiadas solicitudes
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Error interno del servidor
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````