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

# Obtenir detall d'una operació

> Retorna el detall públic d'una operació existent a l'organització autoritzada.



## OpenAPI

````yaml /ca/api-reference/openapi.ca-v1.json get /v1/organizations/{organization_id}/operations/{operation_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}/operations/{operation_id}:
    get:
      tags:
        - Operacions
      summary: Obtenir detall d'una operació
      description: >-
        Retorna el detall públic d'una operació existent a l'organització
        autoritzada.
      operationId: get_operation_by_id
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Identificador de l'organització.
          example: 507f1f77bcf86cd799439011
        - name: operation_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Identificador de l'operació.
          example: 64f0c2a1b2d3e4f506070811
      responses:
        '200':
          description: Operació recuperada correctament.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOperationByIdResponseV1'
              examples:
                operation_detail:
                  summary: Detall d'operació
                  value:
                    id: 64f0c2a1b2d3e4f506070811
                    organization_id: 507f1f77bcf86cd799439011
                    name: remote_assistance
                    description: Operación de asistencia remota
                    status: finished
                    created_at: '2026-03-10T09:11:45Z'
                    started_at: '2026-03-10T09:12:00Z'
                    ended_at: '2026-03-10T09:15:17Z'
                    microservice_id: 64f0c2a1b2d3e4f506070833
                    flow_id: 64f0c2a1b2d3e4f506070844
                    remote_support:
                      start_date: '2026-03-10T09:12:00Z'
                      end_date: '2026-03-10T09:15:17Z'
                      type: unattended
        '400':
          description: Paràmetres de camí no vàlids.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_identifier:
                  summary: Identificador amb format invàlid
                  value:
                    error:
                      message: El identificador de operación no es válido
                      code: bad_request
                      details: >-
                        operation_id debe tener 24 caracteres hexadecimales en
                        minúscula.
        '401':
          description: No autoritzat o sense accés a l'organització.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Fallo d'autorització
                  value:
                    error:
                      message: No autorizado
                      code: unauthorized
        '404':
          description: Operació no trobada a l'organització autoritzada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_found:
                  summary: Operació inexistent
                  value:
                    error:
                      message: Operación no encontrada
                      code: not_found
        '500':
          description: Error intern del servidor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unexpected_error:
                  summary: Error inesperat
                  value:
                    error:
                      message: Error interno del servidor
                      code: internal_error
components:
  schemas:
    GetOperationByIdResponseV1:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador de l'execució de l'operació.
        name:
          type: string
          description: Nom de l'operació.
        organization_id:
          type: string
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador de l'organització propietària de l'operació.
        description:
          type: string
          description: >-
            Descripció de l'operació. Es retorna cadena buida quan no existeix
            en origen.
        status:
          type: string
          enum:
            - finished
            - unknown
            - error
            - pending
            - in-progress
            - timeout
            - cancelled
            - scheduled
          description: Estat actual de l'operació.
        created_at:
          type: string
          format: date-time
          description: Marca temporal de creació.
        started_at:
          type: string
          format: date-time
          nullable: true
          description: Marca temporal d'inici.
        ended_at:
          type: string
          format: date-time
          nullable: true
          description: Marca temporal de finalització.
        microservice_id:
          type: string
          nullable: true
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador del microservei relacionat, quan existeixi.
        flow_id:
          type: string
          nullable: true
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador del flux relacionat, quan existeixi.
        remote_support:
          $ref: '#/components/schemas/GetOperationByIdRemoteSupportV1'
      required:
        - id
        - organization_id
        - name
        - description
        - status
        - created_at
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
    GetOperationByIdRemoteSupportV1:
      type: object
      nullable: true
      properties:
        start_date:
          type: string
          format: date-time
          nullable: true
          description: Data d'inici del suport remot.
        end_date:
          type: string
          format: date-time
          nullable: true
          description: Data de finalització del suport remot.
        type:
          type: string
          nullable: true
          description: Tipus de sessió de suport remot.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````