Open taylorhickem opened 9 months ago
from toggl support: diane.thompson@toggl.com
The safe bet is indeed 1 req/sec, but the user may be able to pass that limit depending on the load. There's some details on our API docs here.
Indeed the DELETE endpoint does allow only single operations. However, you can use the PATCH operation to do a bulk delete. The trick is to set the op to replace and path to /deleted_at.
Example:
PATCH https://track.toggl.com/api/v9/workspaces/9999/time_entries/1111,2222,3333 [ { "op": "add", "path": "/deleted_at" } ] This would cause the TEs 1111, 2222 and 3333 (of workspace 9999) to get deleted. If you want to undo the deletion, all you need to do is change the op to remove. There is a hard limit of 100 IDs per request
bulk delete
In case of large data stored on server >100k entries, concern is that this may slow down API performance. So would like to be able to bulk delete and purge past entries older than x years. However, the API seems only to have feature to delete one entry at a time.
16
request to Toggl API support team
Hi! Do you mind if I submit a few technical clarification questions that is related to my use case? I was able to find the correct API routes for the time_entries get as well as delete, however I was unsuccessful at finding any bulk delete routes and could only find delete for a single entry at a time. So I used a for loop and it worked, however, I do have some clarification questions.