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

# List workspace agent versions

> Returns the paginated version history of the agent for a workspace within an organization, exposing only discovered_at and version.



## OpenAPI

````yaml /en/api-reference/openapi.en-v2.json get /v2/organizations/{organization_id}/workspaces/{workspace_id}/agent-versions
openapi: 3.0.3
info:
  title: API Publica Portal
  version: 2.0.0
  description: Public REST API for portal
servers:
  - url: https://api.flexxible.net
    description: Portal API (production)
security:
  - bearerAuth: []
tags:
  - name: Digital activity
    description: Creation of core process groups by organization
  - name: Roles
    description: Endpoint de creacion de roles de organizacion
  - name: Usuarios
    description: Endpoint de creacion de usuarios de organizacion
  - name: Grupos de workspaces
    description: Endpoints de gestión de grupos de workspaces
  - name: Workspaces
    description: Endpoint de eliminacion de workspaces de la organizacion
  - name: Aplicaciones instaladas
    description: Endpoint de detalle de aplicación instalada de la organización
  - name: Autenticación
    description: Endpoints de autenticación y contexto de sesión
  - name: Microservicios
    description: Detalle de microservicios por organizacion
  - name: Operaciones
    description: Consulta de detalle de operaciones por organización
  - name: Organización
    description: Operaciones de organización
  - name: Objetivos de política de parches
    description: Endpoints de gestión de objetivos de política de parches
  - name: Configuraciones de producto
    description: Endpoints de gestión de configuraciones de producto
  - name: Grupos de reporte
    description: Operaciones sobre grupos de reporte
  - name: Sesiones
    description: Endpoint de detalle de sesion de la organizacion
  - name: Tenants
    description: Endpoints de gestión de tenants
paths:
  /v2/organizations/{organization_id}/workspaces/{workspace_id}/agent-versions:
    get:
      tags:
        - Workspaces
      summary: List workspace agent versions
      description: >-
        Returns the paginated version history of the agent for a workspace
        within an organization, exposing only discovered_at and version.
      operationId: workspaces_agent_versions
      parameters:
        - name: organization_id
          in: path
          required: true
          description: Organization identifier.
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          example: 64b7f1a2c3d4e5f60718293a
        - name: workspace_id
          in: path
          required: true
          description: Workspace identifier.
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          example: 64b7f1a2c3d4e5f60718293b
        - name: page
          in: query
          required: false
          description: Page number to query.
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 100
            minimum: 1
            maximum: 100
          description: Number of items per page.
        - name: fields
          in: query
          required: false
          description: Response fields to be included, separated by commas.
          schema:
            type: string
        - name: sort
          in: query
          required: false
          description: Sort expression in the format <field>:asc|desc.
          schema:
            type: string
            pattern: ^([a-z_]+):(asc|desc)$
        - name: filters
          in: query
          required: false
          description: JSON expression of filters on filterable fields of the response.
          schema:
            type: string
          examples:
            simple:
              summary: Simple filter by version
              value: '{"field":"version","op":"contains","value":"5.2"}'
            complex_and:
              summary: Compound filter with and
              value: >-
                {"and":[{"field":"version","op":"contains","value":"5."},{"field":"discovered_at","op":"contains","value":"2026-06"}]}
            complex_or_and:
              summary: Compound filter with or and and
              value: >-
                {"and":[{"or":[{"field":"version","op":"eq","value":"5.2.0"},{"field":"version","op":"eq","value":"5.2.1"}]},{"field":"discovered_at","op":"contains","value":"2026-06"}]}
      responses:
        '200':
          description: Paginated list of agent versions for the workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWorkspaceAgentVersionsResponseV2'
              examples:
                success:
                  summary: Successful paginated response
                  value:
                    data:
                      - discovered_at: '2026-06-18T10:20:30.000Z'
                        version: 5.2.1
                      - discovered_at: '2026-05-10T08:00:00.000Z'
                        version: 5.1.9
                    has_next: true
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_filters:
                  summary: Invalid filters format
                  value:
                    error:
                      message: Could not process filters
                      code: BAD_REQUEST
                      details: >-
                        Operator "contains" is not allowed for field
                        "discovered_at".
        '401':
          description: Unauthorized to access the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Invalid credentials or no access
                  value:
                    error:
                      code: unauthorized
                      message: No autorizado para acceder a este recurso.
        '404':
          description: Resource not found within the authorized scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_found:
                  summary: Workspace with no available history
                  value:
                    error:
                      code: not_found
                      message: No se encontro el recurso solicitado.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: Unexpected failure
                  value:
                    error:
                      code: internal_error
                      message: Se ha producido un error interno.
components:
  schemas:
    GetWorkspaceAgentVersionsResponseV2:
      type: object
      additionalProperties: false
      required:
        - data
        - has_next
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceAgentVersionItemV2'
        has_next:
          type: boolean
          description: Indicates if more results exist on the next page.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
    WorkspaceAgentVersionItemV2:
      type: object
      additionalProperties: false
      required:
        - discovered_at
        - version
      properties:
        discovered_at:
          type: string
          format: date-time
          description: Date when the agent version was detected.
        version:
          type: string
          description: Agent version detected in the workspace.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````