Introduction
This guide is aimed at helping you mass delete TimeEntries. It can help you reset clear TimeEntries after an incorrect import or any problem encountered when updating TimeEntries.Deletion is permanent.
Please bear in mind that once TimeEntries have been deleted,
they cannot be restored back.
Prerequisites
You will need:- (required) Your domain name
{yourDomain}, eg: “https://myawesomecompany.ilucca.net”. - (required) An API key
{apiKey}that has TimeEntries editing rights to the given owners.
Guide
1. Identify TimeEntries
Retrieving TimeEntries is achieved through the/api/v3/timeentries endpoint. Its API reference can be found here.
In order to isolate the TimeEntries that need to be deleted, the most common filters are:
?ownerId=1,2,...: filter on the user(s).?startsAt=between,2022-01-01,2022-O2-01: filter on the TimeEntry date.?unit=0,1,2: filter on the TimeEntry unit.
If timesheetId is not null.
If the
timesheetId of the returned TimeEntries is not null, then it
belongs to a submitted timesheet and cannot be deleted as long as said
timesheet is not rejected.2. Delete TimeEntries
Deleting TimeEntries can be done through a DELETE request on the/api/v3/timeentries endpoint. The array of TimeEntries to delete must be passed in the request body.
Please refer to the API reference.