Skip to main content

Warehouse-aggregations

POST Regenerates aggregations for a given set of workspace IDs.

https://api.track.toggl.com/warehouse/aggregations/generate

Regenerates aggregations for a given set of workspace IDs. The type of aggregations to be regenerated will either be project-total-time or planed-task-total-time.

curl -X POST https://api.track.toggl.com/warehouse/aggregations/generate \
-H "Content-Type: application/json" \
-d '{"aggregation":"string","batch_size":"integer","current_entity":"string","current_entity_id":"integer","entities":["string"],"project_ids":["integer"],"reset":"boolean","workspace_ids":["integer"]}'

Parameters

Body

nametypedescription
aggregationstringAggregation type.
batch_sizeintegerSize of the batch for loop based generation processes
current_entitystringCurrent entity, to generate data from a point forward
current_entity_idintegerCurrent entity id, to generate data from a point forward
entitiesArray of stringList of entities to scan
project_idsArray of integerProjectIDs fetch time-entries that belong to any of these projects.
resetbooleanDrops existing aggregation data
workspace_idsArray of integerWorkspaceIDs fetch time-entries that belong to any of these workspaces.

Response

204

Aggregation generation process started.

400

Possible error messages:

* Invalid aggregation type.
* request body can't be empty
* unsupported aggregation type

500

Server Error
© 2024 Toggl. All rights reserved.