tasks

Lists tasks, search and filters allow fine grained lists to be generated. * * Query parameters can be added to performed more fine grained filtering of the tasks, these are handled by the TaskFilters class which defines the methods available

get/api/v1/tasks

Request

Query parameters

includestring
Example:first_load

Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes

indexstring
Example:user

Replaces the default response index from data to a user specific string

ie.

  ?index=new_index

response is wrapped

  {
    'new_index' : [
      .....  
    ]
  }
per_pageinteger
Example:20

The number of records to return for each request, default is 20

pageinteger
Example:1

The page number to return for this request (when performing pagination), default is 1

sortstring[]

Order the list by choosing a column and direction. Each value uses the form column|asc or column|desc.

Single sort — for example sort=due_date|asc.

Multiple sorts — for example
sort[]=status_id|asc&sort[]=id|desc.

Tasks accept tasks columns plus client.name, client_id, contact.*, and documents where the filter implements them. Unsupported keys are ignored.

[
  "due_date|asc",
  "id|desc"
]

Headers

X-API-TOKENstring required
Example:TOKEN

The API token to be used for authentication

X-Requested-Withstring required
Example:XMLHttpRequest

Used to send the XMLHttpRequest header

Response

A list of tasks

Example response

{
  "data": [
    {
      "id": "Opnel5aKBz",
      "user_id": "Opnel5aKBz",
      "assigned_user_id": "Opnel5aKBz",
      "client_id": "Opnel5aKBz",
      "invoice_id": "Opnel5aKBz",
      "project_id": "Opnel5aKBz",
      "number": "TASK-123",
      "time_log": "[[1,2],[3,4]]",
      "is_running": true,
      "is_deleted": true,
      "task_status_id": "Opnel5aKBz",
      "description": "A wonder task to work on",
      "duration": 3600,
      "task_status_order": 4,
      "rate": 10,
      "custom_value1": "2022-10-10",
      "custom_value2": "$1100",
      "custom_value3": "I need help",
      "custom_value4": "INV-3343",
      "is_date_based": true,
      "calculated_start_date": "2022-10-10",
      "invoice_documents": true,
      "created_at": 1434342123,
      "updated_at": 1434342123,
      "archived_at": 1434342123,
      "hash": "a1b2c3d4e5f6",
      "status_id": "Opnel5aKBz",
      "status_order": 1,
      "status_sort_order": 1,
      "tags": [
        {
          "id": "Opnel5aKBz",
          "name": "Urgent",
          "color": "#FF0000"
        }
      ]
    }
  ],
  "meta": {
    "pagination": {
      "total": 1,
      "count": 1,
      "per_page": 1,
      "current_page": 1,
      "total_pages": 1
    }
  }
}

Changes