Hi @Frederic_Malenfant,
I talked with our API team and we think that there might be some confusion with how completed_since
works.
The completed_since
query param can be a bit confusing because it includes both completed and incomplete tasks. It should really be called something like incomplete_and_completed_since
because using this query param will return tasks that are completed and incompleted since the specified date-time.
Example Scenario:
Let’s say you have a project with Section 1 (GID: 123)
Section 1:
- Task 1 [COMPLETED - 06/14/2023]
- Task 2 [INCOMPLETE]
- Task 3 [COMPLETED - 06/14/2023]
Let’s say your request look like:
/tasks?section=123&completed_since=2023-06-17T00:00:00.000Z
This will return something like:
{
"data": [
{
"gid": "789",
"name": "Task 2",
"resource_type": "task",
"resource_subtype": "default_task"
}
]
}
Let’s say you modify your request to:
/tasks?section=123&completed_since=2023-06-13T00:00:00.000Z
This will return:
{
"data": [
{
"gid": "456",
"name": "Task 1",
"resource_type": "task",
"resource_subtype": "default_task"
},
{
"gid": "789",
"name": "Task 2",
"resource_type": "task",
"resource_subtype": "default_task"
},
{
"gid": "101112",
"name": "Task 3",
"resource_type": "task",
"resource_subtype": "default_task"
}
]
}
Notice that in this second request we set the date to 2023-06-13T00:00:00.000Z
which captures tasks (completed and incompleted) since/after 2023-06-13T00:00:00.000Z
within Section 123.
If you would still like to use this particular endpoint (Get multiple tasks) to get incompleted tasks since <YOUR_DATE_TIME> then you could ask for the (i.e. completed
property) in the opt_fields
and do client side filtering after you received the response.