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

> Recupera informació detallada sobre un flux específic, inclosa la seva configuració, lògica d'execució, condicions, destinacions i mètriques d'execució. Retorna les dades completes del flux en el idioma sol·licitat.



## OpenAPI

````yaml /ca/api-reference/openapi.ca-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 pública REST per al portal
servers:
  - url: https://api.flexxible.net
    description: Portal API (production)
security:
  - bearerAuth: []
tags: []
paths:
  /v1/organizations/{organization_id}/flows/{flow_id}:
    get:
      tags:
        - Fluxos
      summary: Recuperar un flux
      description: >-
        Recupera informació detallada sobre un flux específic, inclosa la seva
        configuració, lògica d'execució, condicions, destinacions i mètriques
        d'execució. Retorna les dades completes del flux en el idioma
        sol·licitat.
      operationId: getFlowById
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: El identificador únic de l'organització
          example: 507f1f77bcf86cd799439011
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: L'identificador únic del flux
          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: >-
            Codi de idioma per a camps de text que admeten diversos idiomes. Al
            crear o actualitzar recursos, això especifica el idioma dels valors
            de text proporcionats. Al recuperar recursos, això determina quina
            variant de idioma dels camps de text multilingües es retorna. Valors
            acceptats: 'en-EN' (anglès), 'es-ES' (espanyol), 'pt-BR'
            (portuguès), 'ca-ES' (català), 'eu-ES' (euskera). El valor
            predeterminat és 'es-ES' si no es proporciona.
      responses:
        '200':
          description: >-
            Detalls del flux recuperats correctament. La resposta inclou la
            configuració completa del flux, condicions, destinacions i mètriques
            d'execució.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowV1'
        '400':
          $ref: '#/components/responses/BadRequest'
          description: Sol·licitud incorrecta - ID de flux no vàlid
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: No autoritzat - es requereix autenticació
        '404':
          $ref: '#/components/responses/NotFound'
          description: Flux no trobat
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    FlowV1:
      type: object
      description: >-
        Detall del flux tal com el retorna GET flow by id. L'organització està
        implícita per la ruta
        `/v1/organizations/{organization_id}/flows/{flow_id}`. Els
        workspaces/grups de destinació es normalitzen en target.ids (cadenes
        hexadecimals 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: Resol per Accept-Language quan és multilingüe
        description:
          type: string
          description: Resol per Accept-Language quan és multilingüe
        type:
          type: string
          enum:
            - session
            - workspace
        version:
          type: number
        detection_only:
          type: boolean
        cooldown_minutes:
          type: number
          description: Temps d'espera en minuts
        enabled:
          type: boolean
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FlowConditionV1'
          description: Omitit o buit quan el flux no té condicions
        trigger:
          type: string
          nullable: true
        target:
          $ref: '#/components/schemas/FlowTargetSelectorV1'
          description: >-
            Destí d'execució: el tipus selecciona l'abast; ids enumera valors de
            _id de Workspace, _id de grup de Workspace o _id de Grup de reporte
            (buit quan el tipus és ALL_WORKSPACES)
        microservice_id:
          type: string
          nullable: true
          description: ID del microservei vinculat quan està present
        init_text:
          type: string
          nullable: true
          description: Resol per Accept-Language quan és multilingüe
        ok_text:
          type: string
          nullable: true
          description: Resol per Accept-Language quan és multilingüe
        ko_text:
          type: string
          nullable: true
          description: Resol per Accept-Language quan és multilingüe
        execution_metrics:
          $ref: '#/components/schemas/FlowExecutionMetricsV1'
          nullable: true
          description: Present quan es van calcular mètriques per a aquest flux
      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 sempre és []. WORKSPACES: ids són _id de
            documents de Workspace (24 hex). WORKSPACE_GROUPS /
            REPORTING_GROUPS: ids són valors de _id de grup.
        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: Sol·licitud incorrecta
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: No autoritzat
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: No trobat
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Masses sol·licituds
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Error intern del servidor
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````