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

# Get Task List

> Fetches tasks for a workspace filtered by criteria in the request body, returning a total `count` and a page of `rows`. Pass `?count=true` to receive only the count.



## OpenAPI

````yaml POST /api/v1/ops/workspaces/{workspaceId}/tasks/list
openapi: 3.1.0
info:
  title: Xenia Team API - Get Task List
  version: 1.0.0
  description: >-
    Returns a paginated task list matching the supplied criteria. Unlike the
    catalog endpoint, this returns a flat `{ count, rows }` payload (no grouped
    counts). Response envelope is produced by
    `handleListingStatusResponseMinField`. Requires CAN_VIEW_TASKS or
    CAN_VIEW_WORK_ORDERS on the acting user.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/ops/workspaces/{workspaceId}/tasks/list:
    post:
      tags:
        - Tasks
      summary: Get Task List
      description: >-
        Fetches tasks for a workspace filtered by criteria in the request body,
        returning a total `count` and a page of `rows`. Pass `?count=true` to
        receive only the count.
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: cb363f7e-c52a-4478-911d-f6a6f791090e
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                searchText:
                  type: string
                  description: Free-text search across task titles.
                  example: inspection
                offset:
                  type: integer
                  description: Number of rows to skip (default 0).
                  example: 0
                limit:
                  type: integer
                  description: Page size (default 100).
                  example: 100
                taskStatus:
                  type: array
                  description: Filter by one or more task statuses.
                  items:
                    type: string
                    enum:
                      - Open
                      - In Progress
                      - On Hold
                      - Completed
                      - Missed
                  example:
                    - Open
                    - In Progress
                advanceFilters:
                  type: object
                  description: Advanced filter tree (same shape as the catalog endpoint).
                  properties:
                    condition:
                      type: string
                      enum:
                        - AND
                        - OR
                    filters:
                      type: array
                      items:
                        type: object
                        properties:
                          filterName:
                            type: string
                            example: locations
                          comparator:
                            type: string
                            enum:
                              - is
                              - isNot
                          value:
                            type: array
                            items:
                              type: string
                          conditional:
                            type: string
                            enum:
                              - and
                              - or
                        required:
                          - filterName
                          - comparator
                          - value
                  required:
                    - condition
                    - filters
            example:
              searchText: ''
              offset: 0
              limit: 100
              taskStatus:
                - Open
                - In Progress
              advanceFilters:
                condition: AND
                filters:
                  - filterName: locations
                    comparator: is
                    value:
                      - 62c70dc8-f8ce-4dfe-a798-844197610e11
                    conditional: and
      responses:
        '200':
          description: Task list retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      count:
                        type: integer
                      rows:
                        type: array
                        items:
                          type: object
                  statusObject:
                    type:
                      - object
                      - 'null'
                  notification:
                    type: boolean
                    description: >-
                      Whether unread task notifications exist for the acting
                      user.
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      last_page:
                        type: integer
                      per_page:
                        type: integer
                      total:
                        type: integer
              example:
                data:
                  count: 58
                  rows:
                    - id: 232154c0-c239-48f8-b670-0e5d12fd64d0
                      title: room inspection
                      taskStatus: Open
                      priority: High
                      startDate: '2025-06-23T19:00:00.000Z'
                      dueDate: '2025-06-25T18:30:00.000Z'
                      LocationId: 62c70dc8-f8ce-4dfe-a798-844197610e11
                      vendorId: null
                statusObject: null
                notification: false
                meta:
                  current_page: 1
                  last_page: 1
                  per_page: 100
                  total: 58
        '400':
          description: Bad Request - Invalid filter parameters.
        '401':
          description: Unauthorized - Invalid client credentials.
        '403':
          description: Forbidden - API key not authorized for this route.
        '404':
          description: Not Found - Workspace does not exist.
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````