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

# Llistar operacions

> Retorna una llista paginada d'operacions per al Workspace seleccionat.



## OpenAPI

````yaml /ca/api-reference/openapi.ca-v1.json get /v1/organizations/{organization_id}/workspaces/{workspace_id}/operations
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
security:
  - bearerAuth: []
tags: []
paths:
  /v1/organizations/{organization_id}/workspaces/{workspace_id}/operations:
    get:
      tags:
        - Workspaces
      summary: Llistar operacions
      description: Retorna una llista paginada d'operacions per al Workspace seleccionat.
      operationId: workspaces_operations
      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: workspace_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Identificador de Workspace.
          example: 507f1f77bcf86cd799439099
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
          description: Número de pàgina.
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 100
            maximum: 100
            minimum: 1
          description: Número d'elements per pàgina.
        - name: fields
          in: query
          required: false
          schema:
            type: string
            maxLength: 2048
          description: >-
            Noms de camps d'elements de resposta separats per comes per
            incloure.
        - name: filters
          in: query
          required: false
          schema:
            type: string
            maxLength: 5120
          description: >-
            Expressió de filtre JSON sobre rutes de camps filtrables del
            contracte d'operació.
          examples:
            simple:
              summary: Filtrar per nom d'operació
              value: '{"field":"name","op":"contains","value":"remote"}'
            complex-and:
              summary: Filtrar per estat i rang d'inici
              value: >-
                {"and":[{"field":"status","op":"eq","value":"finished"},{"field":"started_at","op":"gte","value":"2026-03-10T00:00:00.000Z"}]}
            complex-or-and:
              summary: Combina condicions OR i AND
              value: >-
                {"and":[{"or":[{"field":"name","op":"contains","value":"remote"},{"field":"description","op":"contains","value":"remote"}]},{"field":"created_at","op":"gte","value":"2026-03-01T00:00:00.000Z"}]}
        - name: sort
          in: query
          required: false
          schema:
            type: string
          description: >-
            Expressió d'ordenació amb la forma <field>:asc|desc sobre rutes de
            camps escalars de resposta ordenables.
      responses:
        '200':
          description: Operacions de Workspace recuperades correctament.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWorkspaceOperationsResponseV1'
              examples:
                paginated_result:
                  summary: Llista paginada amb elements
                  value:
                    has_next: true
                    data:
                      - id: 64f0c2a1b2d3e4f506070811
                        organization_id: 507f1f77bcf86cd799439011
                        name: remote_assistance
                        description: Iniciar sesión de asistencia remota desatendida
                        status: finished
                        started_at: '2026-03-10T09:12:00Z'
                        ended_at: '2026-03-10T09:15:17Z'
                        created_at: '2026-03-10T09:11:45Z'
                        microservice_id: null
                        flow_id: null
                        remote_support:
                          start_date: '2026-03-10T09:12:00Z'
                          end_date: '2026-03-10T09:15:17Z'
                          type: unattended
                empty_result:
                  summary: No es van trobar operacions
                  value:
                    has_next: false
                    data: []
        '400':
          description: Paràmetres de sol·licitud no vàlids.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_filters:
                  summary: Format de filtres no vàlid
                  value:
                    error:
                      message: Formato de filtros no válido
                      code: bad_request
                      details: filters debe ser una cadena JSON válida
        '401':
          description: No autoritzat o l'organització no és accessible.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                organization_not_authorized:
                  summary: Fallada d'accés a l'organització
                  value:
                    error:
                      message: No autorizado
                      code: unauthorized
        '404':
          description: Workspace no trobat dins l'àmbit autoritzat de l'organització.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                workspace_not_found:
                  summary: El Workspace no existeix en l'abast
                  value:
                    error:
                      message: Workspace no encontrado
                      code: not_found
        '500':
          description: Error intern del servidor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unexpected_error:
                  summary: Fallada inesperada
                  value:
                    error:
                      message: Error interno del servidor
                      code: internal_error
components:
  schemas:
    GetWorkspaceOperationsResponseV1:
      type: object
      properties:
        has_next:
          type: boolean
          description: Indica si hi ha una altra pàgina disponible.
        data:
          type: array
          items:
            $ref: '#/components/schemas/GetOperationByIdResponseV1'
      required:
        - has_next
        - data
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
    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
    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

````