Project task

Projecttasks endpoint enables you to get projecttask information and manage projecttasks in Silverbucket's database. Endpoint's URL is:

https://<your_environment_url>/customer-api/1.0/projecttasks/

GET


When calling /projecttasks/ endpoint without parameters you will get all the projecttasks from database. Example response:
{
    "count": 1,
    "csvUrl": "/customer-api/1.0/projecttasks/?csv=true",
    "itemsPerPage": 500,
    "excelUrl": "/customer-api/1.0/projecttasks/?excel=true",
    "next": null,
    "current": 1,
    "lastPage": 1,
    "data": [
        {
          "id": 1,
          "name": "Other",
          "active": true,
          "invoiceable": false,
          "estimated_hours": null,
          "project": 1,
        },
    ],
    "previous": null
}

POST


You can add projecttask's with POST method to the same URL than get. POST body contains new projecttask's data in JSON format. Successful call will give response code 201 and return the newly created projecttask's JSON. Minimum JSON for adding a projecttask is:
{
    "id": 1,
    "name": "<string>",
    "active": <boolean: true|false>,
    "invoiceable": <boolean: true|false>,
    "project": <project_id>,
}

How did we do with this article?