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

# Listar operaciones de una organización

> Devuelve una lista paginada de operaciones de la organización autorizada.



## OpenAPI

````yaml /api-reference/openapi-v1.json get /v1/organizations/{organization_id}/operations
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}/operations:
    get:
      tags:
        - Operaciones
      summary: Listar operaciones de una organización
      description: >-
        Devuelve una lista paginada de operaciones de la organización
        autorizada.
      operationId: get_operations
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Identificador de la organización.
          example: 507f1f77bcf86cd799439011
        - 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 de elementos por página.
        - name: fields
          in: query
          required: false
          schema:
            type: string
            maxLength: 2048
          description: Campos de respuesta separados por comas para cada elemento.
          example: id,organization_id,name,description,status,created_at
        - name: filters
          in: query
          required: false
          schema:
            type: string
            maxLength: 5120
          description: Expresión JSON de filtros sobre campos filtrables del recurso.
          examples:
            simple:
              summary: Filtrar por nombre
              value: '{"field":"name","op":"contains","value":"remote"}'
            complex-and:
              summary: Filtrar por estado y descripción
              value: >-
                {"and":[{"field":"status","op":"eq","value":"finished"},{"field":"description","op":"contains","value":"remote"}]}
            complex-or-and:
              summary: Combinar condiciones OR y AND
              value: >-
                {"and":[{"or":[{"field":"microservice_id","op":"eq","value":"64f0c2a1b2d3e4f506070833"},{"field":"flow_id","op":"eq","value":"64f0c2a1b2d3e4f506070844"}]},{"field":"status","op":"eq","value":"pending"}]}
        - name: sort
          in: query
          required: false
          schema:
            type: string
            pattern: ^([a-z_]+):(asc|desc)$
          description: >-
            Expresión de ordenación con el formato <field>:asc|desc. En modo
            agregado, solo acepta campos de `group_by` o aliases agregados
            (`count`, `<function>_<field>`).
          example: created_at:desc
        - name: aggregate
          in: query
          required: false
          schema:
            type: string
            maxLength: 1024
          description: >-
            Expresión JSON para agregación. Estructura:
            {"group_by":["field"],"aggregates":[{"field":"*","function":"count"}]}.
            No se puede combinar con `fields`.
          examples:
            group-by-status-count:
              summary: Agrupar por estado y contar
              value: >-
                {"group_by":["status"],"aggregates":[{"field":"*","function":"count"}]}
            group-by-organization-count:
              summary: Agrupar por organización y contar
              value: >-
                {"group_by":["organization_id"],"aggregates":[{"field":"*","function":"count"}]}
      responses:
        '200':
          description: Operaciones recuperadas correctamente.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOperationsResponseV1'
              examples:
                paginated_result:
                  summary: Lista paginada con resultados
                  value:
                    has_next: true
                    data:
                      - id: 64f0c2a1b2d3e4f506070811
                        organization_id: 507f1f77bcf86cd799439022
                        name: remote_assistance
                        description: Remote assistance operation
                        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
                aggregated_by_status:
                  summary: Resultado agregado por estado
                  value:
                    has_next: false
                    data:
                      - status: finished
                        count: 12
                      - status: pending
                        count: 5
        '400':
          description: Parámetros de solicitud no válidos.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_filters:
                  summary: Formato de filtros inválido
                  value:
                    error:
                      message: Formato de filtros no válido
                      code: bad_request
                      details: El parámetro filters debe ser una cadena JSON válida.
        '401':
          description: No autorizado o sin acceso a la organización.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Fallo de autorización
                  value:
                    error:
                      message: No autorizado
                      code: unauthorized
        '404':
          description: Recurso no encontrado dentro de la organización autorizada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_found:
                  summary: Recurso inexistente
                  value:
                    error:
                      message: Recurso no encontrado
                      code: not_found
        '500':
          description: Error interno del servidor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unexpected_error:
                  summary: Error inesperado
                  value:
                    error:
                      message: Error interno del servidor
                      code: internal_error
components:
  schemas:
    GetOperationsResponseV1:
      type: object
      properties:
        has_next:
          type: boolean
          description: Indica si existe una página siguiente.
        data:
          type: array
          items:
            $ref: '#/components/schemas/GetOperationItemV1'
      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
    GetOperationItemV1:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador de la ejecución de operación.
        name:
          type: string
          description: Nombre de la operación.
        description:
          type: string
          description: >-
            Descripción de la operación. Se devuelve cadena vacía cuando no
            existe en origen.
        organization_id:
          type: string
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador de la organización propietaria de la operación.
        status:
          type: string
          enum:
            - finished
            - unknown
            - error
            - pending
            - in-progress
            - timeout
            - cancelled
            - scheduled
          description: Estado actual de la operación.
        created_at:
          type: string
          format: date-time
          description: Marca temporal de creación.
        started_at:
          type: string
          format: date-time
          nullable: true
          description: Marca temporal de inicio.
        ended_at:
          type: string
          format: date-time
          nullable: true
          description: Marca temporal de finalización.
        microservice_id:
          type: string
          nullable: true
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador del microservicio relacionado, cuando exista.
        flow_id:
          type: string
          nullable: true
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador del flujo relacionado, cuando exista.
        remote_support:
          $ref: '#/components/schemas/GetOperationRemoteSupportV1'
      required:
        - id
        - organization_id
        - name
        - description
        - status
        - created_at
    GetOperationRemoteSupportV1:
      type: object
      nullable: true
      properties:
        start_date:
          type: string
          format: date-time
          nullable: true
          description: Fecha de inicio del soporte remoto.
        end_date:
          type: string
          format: date-time
          nullable: true
          description: Fecha de fin del soporte remoto.
        type:
          type: string
          nullable: true
          description: Tipo de sesión de soporte remoto.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````