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

# Get all tasks

> Return a paginated list of tasks (child tickets) for your company. Pass a task id to getTicket to fetch that single task.

<span className="badge-read">Key: Read</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json get /tasks
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /tasks:
    get:
      tags:
        - Tasks
      summary: Get all tasks
      description: >-
        Return a paginated list of tasks (child tickets) for your company. Pass
        a task id to getTicket to fetch that single task.
      operationId: getTasks
      parameters:
        - name: page
          required: false
          in: query
          description: Page number
          schema:
            minimum: 1
            maximum: 9007199254740991
            default: 1
            type: number
        - name: perPage
          required: false
          in: query
          description: Number of items per page (max 100)
          schema:
            minimum: 1
            maximum: 100
            default: 50
            type: number
        - name: status
          required: false
          in: query
          schema:
            type: string
            enum:
              - PENDING
              - IN_PROGRESS
              - COMPLETED
              - CANCELLED
        - name: priority
          required: false
          in: query
          schema:
            type: string
            enum:
              - LOW
              - MEDIUM
              - HIGH
        - name: assigneeEmployeeId
          required: false
          in: query
          description: Filter by assignee employee ID
          schema:
            type: string
        - name: parentTicketId
          required: false
          in: query
          description: Filter by parent ticket ID
          schema:
            type: string
        - name: dueDate
          required: false
          in: query
          schema:
            enum:
              - OVERDUE
              - TODAY
              - THIS_WEEK
              - NO_DUE_DATE
            type: string
        - name: tagIds
          required: false
          in: query
          description: Filter tasks by tag ids
          schema:
            type: array
            items:
              type: string
        - name: searchTerm
          required: false
          in: query
          description: Filter tasks by title
          schema:
            type: string
            minLength: 1
        - name: sortBy
          required: false
          in: query
          schema:
            enum:
              - status
              - priority
              - reference
              - dueDate
              - title
            type: string
        - name: sortDirection
          required: false
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTasks_Output'
components:
  schemas:
    GetTasks_Output:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              ticketId:
                description: Id of the parent ticket
                type: string
              reference:
                type: string
              title:
                type: string
              status:
                type: string
                enum:
                  - PENDING
                  - IN_PROGRESS
                  - COMPLETED
                  - CANCELLED
              priority:
                anyOf:
                  - type: string
                    enum:
                      - LOW
                      - MEDIUM
                      - HIGH
                  - type: 'null'
              dueDate:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: 'null'
              assignee:
                anyOf:
                  - anyOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            const: EMAIL
                          email:
                            type: string
                          displayName:
                            type: string
                        required:
                          - type
                          - email
                          - displayName
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: EMPLOYEE
                          employeeId:
                            type: string
                          displayName:
                            type: string
                          email:
                            type: string
                          pictureUrl:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - type
                          - employeeId
                          - displayName
                          - email
                          - pictureUrl
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: EXTERNAL_ADMIN
                          userId:
                            type: string
                          displayName:
                            type: string
                          email:
                            type: string
                          pictureUrl:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - type
                          - userId
                          - displayName
                          - email
                          - pictureUrl
                        additionalProperties: false
                  - type: 'null'
              isManuallyCompletable:
                description: Whether a human (not only the system) may complete this task
                type: boolean
              isAdminManaged:
                description: >-
                  Whether only an admin may assign this task or change its
                  status
                type: boolean
              tagIds:
                description: Ids of the tags attached to this task
                type: array
                items:
                  type: string
              parentTicket:
                anyOf:
                  - type: object
                    properties:
                      id:
                        type: string
                      reference:
                        type: string
                      title:
                        type: string
                    required:
                      - id
                      - reference
                      - title
                    additionalProperties: false
                  - type: 'null'
              createdAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              updatedAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            required:
              - id
              - ticketId
              - reference
              - title
              - status
              - priority
              - dueDate
              - assignee
              - isManuallyCompletable
              - isAdminManaged
              - tagIds
              - parentTicket
              - createdAt
              - updatedAt
            additionalProperties: false
        pagination:
          type: object
          properties:
            totalElements:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            totalPages:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            page:
              type: integer
              minimum: 1
              maximum: 9007199254740991
            perPage:
              type: integer
              minimum: 1
              maximum: 100
          required:
            - totalElements
            - totalPages
            - page
            - perPage
          additionalProperties: false
      required:
        - data
        - pagination
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````