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



## OpenAPI

````yaml POST /api/v1/task/workspaces/{workspaceId}/tasks/catalog
openapi: 3.1.0
info:
  title: Xenia Team API - Get Tasks
  version: 1.0.0
  description: >-
    Retrieve tasks with advanced filtering and grouping options. Supports
    flexible filter logic and multiple field types including enums, date ranges,
    and UUID lists.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/task/workspaces/{workspaceId}/tasks/catalog:
    post:
      tags:
        - Tasks
      summary: Get Tasks by Workspace ID
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: cb363f7e-c52a-4478-911d-f6a6f791090e
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                searchText:
                  type: string
                  example: inspection
                offset:
                  type: integer
                  example: 0
                limit:
                  type: integer
                  example: 50
                groupBy:
                  type: string
                  enum:
                    - ''
                    - taskStatus
                    - assignees
                    - AssetId
                    - LocationId
                    - priority
                    - templateSource
                advanceFilters:
                  type: object
                  properties:
                    condition:
                      type: string
                      enum:
                        - AND
                        - OR
                    filters:
                      type: array
                      items:
                        type: object
                        oneOf:
                          - properties:
                              filterName:
                                type: string
                                enum:
                                  - taskStatuses
                              comparator:
                                type: string
                                enum:
                                  - is
                                  - isNot
                              value:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - Open
                                    - In Progress
                                    - On Hold
                                    - Completed
                                    - Missed
                              conditional:
                                type: string
                                enum:
                                  - and
                                  - or
                            required:
                              - filterName
                              - comparator
                              - value
                          - properties:
                              filterName:
                                type: string
                                enum:
                                  - priority
                              comparator:
                                type: string
                                enum:
                                  - is
                                  - isNot
                              value:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - None
                                    - Low
                                    - Medium
                                    - High
                                    - Critical
                              conditional:
                                type: string
                                enum:
                                  - and
                                  - or
                            required:
                              - filterName
                              - comparator
                              - value
                          - properties:
                              filterName:
                                type: string
                                enum:
                                  - startDate
                                  - dueDate
                                  - completedDate
                                  - createdDate
                                  - startDueTime
                                  - instanceActivationTime
                                example: startDate
                                description: Select the date filter field
                              comparator:
                                type: string
                                enum:
                                  - is
                                  - isNot
                                example: is
                                description: Choose comparison operator
                              value:
                                type: array
                                description: Provide a start and end date
                                items:
                                  - type: string
                                    format: date-time
                                    description: Start date
                                    example: '2025-06-01T11:00:00.000Z'
                                  - type: string
                                    format: date-time
                                    description: End date
                                    example: '2025-07-01T10:59:59.000Z'
                                minItems: 2
                                maxItems: 2
                                example:
                                  - '2025-06-01T11:00:00.000Z'
                                  - '2025-07-01T10:59:59.000Z'
                              conditional:
                                type: string
                                enum:
                                  - and
                                  - or
                                example: and
                                description: >-
                                  Logical operator for combining with other
                                  filters
                            required:
                              - filterName
                              - comparator
                              - value
                          - properties:
                              filterName:
                                type: string
                                enum:
                                  - templates
                                  - taskTemplates
                                  - assignees
                                  - categories
                                  - locations
                                  - assets
                                  - projects
                                  - schedules
                                  - completedBy
                              comparator:
                                type: string
                                enum:
                                  - is
                                  - isNot
                              value:
                                type: array
                                items:
                                  type: string
                                  format: uuid
                                  example: 50d9f381-eba0-41b0-b26b-70a47a854252
                              conditional:
                                type: string
                                enum:
                                  - and
                                  - or
                            required:
                              - filterName
                              - comparator
                              - value
                          - properties:
                              filterName:
                                type: string
                                enum:
                                  - taskTypes
                              comparator:
                                type: string
                                enum:
                                  - is
                                  - isNot
                              value:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - oneOff
                                    - recurring
                                    - requested
                                    - corrective
                                    - scheduled
                              conditional:
                                type: string
                                enum:
                                  - and
                                  - or
                            required:
                              - filterName
                              - comparator
                              - value
                          - properties:
                              filterName:
                                type: string
                                enum:
                                  - scheduleFrequency
                              comparator:
                                type: string
                                enum:
                                  - is
                                  - isNot
                              value:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - Daily
                                    - Weekly
                                    - Monthly
                              conditional:
                                type: string
                                enum:
                                  - and
                                  - or
                            required:
                              - filterName
                              - comparator
                              - value
                          - properties:
                              filterName:
                                type: string
                                enum:
                                  - isOverDue
                                  - overLap
                                  - overNight
                              comparator:
                                type: string
                                enum:
                                  - is
                                  - isNot
                              value:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - 'Yes'
                                    - 'No'
                              conditional:
                                type: string
                                enum:
                                  - and
                                  - or
                            required:
                              - filterName
                              - comparator
                              - value
                  required:
                    - condition
                    - filters
      responses:
        '200':
          description: Successful response with task data and count grouping
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      counts:
                        type: array
                        items:
                          type: object
                          properties:
                            group:
                              type: string
                            count:
                              type: integer
                      tasks:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            title:
                              type: string
                            taskStatus:
                              type: string
                            priority:
                              type: string
                            dueDate:
                              type: string
                              format: date-time
                            startDate:
                              type: string
                              format: date-time
                            assignees:
                              type: array
                              items:
                                type: string
                                format: uuid
                            AssetId:
                              type: string
                              format: uuid
                            LocationId:
                              type: string
                              format: uuid
                            ChecklistId:
                              type: string
                              format: uuid
                            ProjectId:
                              type: string
                              format: uuid
                      apiTime:
                        type: object
                        properties:
                          count:
                            type: number
                          list:
                            type: number
                          total:
                            type: number
                  meta:
                    type: object
        '400':
          description: Bad Request - Invalid filter parameters.
        '401':
          description: Unauthorized - Missing or invalid authentication.
        '403':
          description: Forbidden - Insufficient permissions to access tasks.
        '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

````