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

> Torna una llista paginada de serveis per al Workspace seleccionat. Només aplica per a Workspaces Windows (platform_type=windows).



## OpenAPI

````yaml /ca/api-reference/openapi.ca-v1.json get /v1/organizations/{organization_id}/workspaces/{workspace_id}/services
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}/services:
    get:
      tags:
        - Workspaces
      summary: Llistar serveis
      description: >-
        Torna una llista paginada de serveis per al Workspace seleccionat. Només
        aplica per a Workspaces Windows (platform_type=windows).
      operationId: workspaces_services
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Identificador d'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 de resposta
            filtrables.
          examples:
            simple:
              summary: Filtrar per nom del servei
              value: '{"field":"name","op":"contains","value":"print"}'
            complex-and:
              summary: Filtrar per estat i tipus d'inici
              value: >-
                {"and":[{"field":"status","op":"eq","value":"Running"},{"field":"startup_type","op":"eq","value":"Manual"}]}
            complex-or-and:
              summary: Combina condicions OR i AND
              value: >-
                {"and":[{"or":[{"field":"display_name","op":"contains","value":"agent"},{"field":"description","op":"contains","value":"agent"}]},{"field":"accept_stop","op":"eq","value":true}]}
        - name: sort
          in: query
          required: false
          schema:
            type: string
            pattern: ^([a-z_]+):(asc|desc)$
          description: >-
            Expressió d'ordenació amb format <field>:asc|desc sobre rutes de
            camps escalares de resposta ordenables.
      responses:
        '200':
          description: Serveis de Workspace recuperats correctament.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWorkspaceServicesResponseV1'
              examples:
                paginated_result:
                  summary: Llista paginada amb serveis
                  value:
                    has_next: true
                    data:
                      - id: 64f0c2a1b2d3e4f506070810
                        name: Spooler
                        description: >-
                          Carga archivos en memoria para el procesamiento de
                          impresión.
                        status: Running
                        accept_stop: true
                        display_name: Print Spooler
                        log_on_as: LocalSystem
                        path: C:\Windows\System32\spoolsv.exe
                        organization_id: 507f1f77bcf86cd799439011
                        reporting_group_id: 507f1f77bcf86cd799439077
                        startup_type: Automatic
                        last_updated_at: '2026-03-15T09:45:11Z'
                        workspace_id: 507f1f77bcf86cd799439099
                empty_result:
                  summary: No s'han trobat serveis
                  value:
                    has_next: false
                    data: []
        '400':
          description: >-
            Paràmetres de sol·licitud no vàlids, incloent-hi filtres/sort
            invàlids o Workspace no Windows.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_filters:
                  summary: Format de filters no vàlid
                  value:
                    error:
                      message: Formato de filters no válido
                      code: bad_request
                      details: filters debe ser una cadena JSON válida
                workspace_platform_not_supported:
                  summary: Workspace no suportat per plataforma
                  value:
                    error:
                      message: >-
                        This endpoint supports only windows workspaces
                        (platform_type=windows)
                      code: bad_request
        '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 de l'abast de l'organització autoritzada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                workspace_not_found:
                  summary: Workspace no existeix en l'àmbit
                  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:
    GetWorkspaceServicesResponseV1:
      type: object
      properties:
        has_next:
          type: boolean
          description: Indica si hi ha una altra pàgina disponible.
        data:
          type: array
          items:
            $ref: '#/components/schemas/GetWorkspaceServiceItemV1'
      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
    GetWorkspaceServiceItemV1:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador del servei.
        name:
          type: string
          description: Nom del servei.
        description:
          type: string
          description: Descripció del servei.
        status:
          type: string
          description: Estat del servei.
        accept_stop:
          type: boolean
          nullable: true
          description: Indica si el servei accepta sol·licituds de detenció.
        display_name:
          type: string
          description: Nom per mostrar del servei.
        log_on_as:
          type: string
          description: Compte usat per executar el servei.
        path:
          type: string
          description: Ruta executable del servei.
        organization_id:
          type: string
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador d'organització associat al servei.
        reporting_group_id:
          type: string
          description: Identificador del grup de report associat al servei.
        startup_type:
          type: string
          description: Tipus d'inici del servei.
        last_updated_at:
          type: string
          description: Cadena de marca temporal de l'última actualització.
        workspace_id:
          type: string
          pattern: ^[0-9a-f]{24}$
          minLength: 24
          maxLength: 24
          description: Identificador de Workspace associat al servei.
      required:
        - id
        - name
        - description
        - status
        - display_name
        - log_on_as
        - path
        - organization_id
        - reporting_group_id
        - startup_type
        - last_updated_at
        - workspace_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````