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

# List agent logs for a workspace

> Returns a paginated list of agent log files for a workspace in the organization. Each item includes download_url with the absolute download URL. The download itself is not part of this contract. There is no search_term or aggregation.



## OpenAPI

````yaml /en/api-reference/openapi.en-v2.json get /v2/organizations/{organization_id}/workspaces/{workspace_id}/agent-logs
openapi: 3.0.3
info:
  title: API Publica Portal
  version: 1.0.0
  description: Public REST API for portal
servers:
  - url: https://api.flexxible.net/
    description: Portal API
security:
  - bearerAuth: []
tags:
  - name: Solve
    description: Flexxible Solve ticket visibility and management
  - name: Digital activity
    description: Core process group creation by organization
  - name: Locations
    description: Location management (FWS)
  - name: Roles
    description: Role creation endpoint for organization
  - name: Users
    description: User creation endpoint for organization
  - name: Workspace groups
    description: Management endpoints for workspace groups
  - name: Networks
    description: Network management (FWS)
  - name: WiFi Networks
    description: Wi-Fi network management (FWS)
  - name: Workspaces
    description: Workspace deletion endpoint for the organization
  - name: Agent Logs
    description: Query agent logs for a workspace
  - name: Event logs
    description: Workspace event logs query
  - name: Installed apps
    description: Installed application detail endpoint for the organization
  - name: Authentication
    description: Session context and authentication endpoints
  - name: Microservices
    description: Details of microservices by organization
  - name: Operations
    description: Detail queries for operations by organization
  - name: Organization
    description: Organization operations
  - name: Patch policy targets
    description: Patch policy objective management endpoints
  - name: Product configurations
    description: Product configuration management endpoints
  - name: Reporting Groups
    description: Operations on reporting groups
  - name: Sessions
    description: Session detail endpoint for the organization
  - name: Tenants
    description: Tenant management endpoints
  - name: Workspace Connection Logs
    description: Workspace connection logs query
  - name: Workspace GPO
    description: Query GPOs applied to a session
  - name: Workspace Notifications
    description: Workspace notifications query
paths:
  /v2/organizations/{organization_id}/workspaces/{workspace_id}/agent-logs:
    get:
      tags:
        - Agent Logs
      summary: List agent logs for a workspace
      description: >-
        Returns a paginated list of agent log files for a workspace in the
        organization. Each item includes download_url with the absolute download
        URL. The download itself is not part of this contract. There is no
        search_term or aggregation.
      operationId: listWorkspaceAgentLogs
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Organization identifier.
          example: 507f1f77bcf86cd799439011
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            minLength: 24
            maxLength: 24
          description: Mongo _id identifier of the workspace.
          example: 507f1f77bcf86cd799439012
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
          description: Page number.
        - 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
          schema:
            type: string
            maxLength: 2048
          description: >-
            Comma-separated response fields. If omitted, all fields are
            returned, including download_url.
          example: file_path,uploaded_at,download_url
        - name: filters
          in: query
          required: false
          schema:
            type: string
            maxLength: 5120
          description: >-
            JSON filter expression. AND only. file_path supports contains;
            is_session supports eq; size_in_bytes and uploaded_at support gte.
          example: >-
            {"and":[{"field":"file_path","op":"contains","value":"session"},{"field":"is_session","op":"eq","value":false}]}
        - name: sort
          in: query
          required: false
          schema:
            type: string
            pattern: ^([a-z_]+):(asc|desc)$
          description: >-
            Sort format <field>:asc|desc. Default uploaded_at:asc. Fields:
            file_path, is_session, size_in_bytes, uploaded_at.
          example: uploaded_at:asc
      responses:
        '200':
          description: Agent logs retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAgentLogsResponseV2'
              examples:
                paginated_result:
                  summary: Paginated list
                  value:
                    has_next: false
                    data:
                      - file_path: logs/1.2.3/org/ws/file.log
                        is_session: false
                        size_in_bytes: 1024
                        uploaded_at: '2026-11-13T08:00:00.000Z'
                        download_url: >-
                          https://api.example.com/v2/organizations/507f1f77bcf86cd799439011/workspaces/507f1f77bcf86cd799439012/agent-logs/download?file_path=logs%2F1.2.3%2Forg%2Fws%2Ffile.log
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not authorized or without access to the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The workspace does not exist or does not belong to the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ListAgentLogsResponseV2:
      type: object
      properties:
        has_next:
          type: boolean
          description: Indicates whether another page exists.
        data:
          type: array
          items:
            $ref: '#/components/schemas/AgentLogItemV2'
      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
    AgentLogItemV2:
      type: object
      properties:
        file_path:
          type: string
          description: Path of the log file.
        is_session:
          type: boolean
          description: Indicates whether the file corresponds to a session.
        size_in_bytes:
          type: integer
          description: File size in bytes.
        uploaded_at:
          type: string
          format: date-time
          description: Upload date in UTC.
        download_url:
          type: string
          format: uri
          description: >-
            Absolute URL to download the file, using the request origin. Not
            filterable or sortable.
      required:
        - file_path
        - is_session
        - size_in_bytes
        - uploaded_at
        - download_url
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````