The API endpoints for tasks in DayCaptain are as follows:
-
https://daycaptain.com/backlog-items
, for backlog tasks, located in the inbox or some backlog folder -
https://daycaptain.com/<date-iso-8601>/tasks
, for day-relevant tasks, e.g.https://daycaptain.com/2021-01-01/tasks
-
https://daycaptain.com/<week-iso-8601>/tasks
, for week-relevant tasks, e.g.https://daycaptain.com/2021-W05/tasks
Tip
|
In our tools repository, there is the todos-add cli helper, that uses the same REST API similarly to the curl commands shown on this page.
|
You add a tasks that shows up in your backlogs inbox with the following HTTP call:
This is very helpful for quickly adding tasks that pop up in your head. By using this way, you don’t have to open up the program and you won’t get distracted by all the information.
curl 'https://daycaptain.com/backlog-items' \ -XPOST -i \ -H "Authorization: Bearer <token>" \ -H 'Content-Type: application/json' \ -d '{"string":"Hello Captain"}'
Tip
|
You can achieve the same with the following command: todos-add Hello Captain
|
You can add following information in the request body JSON:
JSON field |
Description |
Example |
|
Task name (mandatory) |
|
|
Backlog where to add (inbox if |
|
|
Additional note |
|
|
Task’s area |
|
|
Task’s project |
|
Note that you can either set an area
OR a project
.
You add a tasks that shows up in your day view of a specific day with the following HTTP call:
This is helpful for quickly adding a task to today’s or tomorrow’s task list.
curl 'https://daycaptain.com/2021-12-31/tasks' \ -XPOST -i \ -H "Authorization: Bearer <token>" \ -H 'Content-Type: application/json' \ -d '{"string":"Celebrating new year"}'
Tip
|
You can achieve the same with the following command: todos-add --date 2021-12-31 Celebrating new year
|
URL path |
Description |
Example |
|
The date in ISO-8601 |
|
JSON field |
Description |
Example |
|
Task name (mandatory) |
|
|
Planned time to spend in minutes |
|
|
Additional note |
|
|
Task’s area |
|
|
Task’s project |
|
|
Repeating the task for n times |
|
|
Repeating the task every n days |
|
Note that you can either set an area
OR a project
.
The repeat
params are optional and if set will cause the task to be repeated.
If repeat
is included with a non-zero amount, but repeatCadence
isn’t, the default cadence is 1
(every) day.
You add a tasks that shows up in your week view of a specific week with the following HTTP call:
curl 'https://daycaptain.com/2021-W01/tasks' \ -XPOST -i \ -H "Authorization: Bearer <token>" \ -H 'Content-Type: application/json' \ -d '{"string":"Plan new year resolutions"}'
Tip
|
You can achieve the same with the following command: todos-add --week 2021-W01 Plan new year resolutions
|
URL path |
Description |
Example |
|
The year week in ISO-8601 |
|
JSON field |
Description |
Example |
|
Task name (mandatory) |
|
|
Planned time to spend in minutes |
|
|
Additional note |
|
|
Task’s area |
|
|
Task’s project |
|
|
Repeating the task for n times |
|
|
Repeating the task every n weeks |
|
Note that you can either set an area
OR a project
.
The repeat
params are optional and if set will cause the task to be repeated.
If repeat
is included with a non-zero amount, but repeatCadence
isn’t, the default cadence is 1
(every) week.