Learn how to use the export feature of Lucca Timesheet through the API. In particular, how to generate a new export and retrieve its content.
Preliminaries
exportConfigurationId
is the second integer URL path parameter
when browsing the graphical interface for Lucca Timesheet export feature. For example, if the UI URL looks
like this when browsing to the export-configuration: https://example.ilucca.net/timmi-timesheet/legacy-settings#/export/1/3/latest
,
then the identifier is 3
.Then, you may want to retrieve the identifier of the latest successful export, it will
help you track the progress of any new export you’ll then create. This can be achieved through the API:Trigger an export
endsAt
, which indicates that all elements prior to it should be exported. Format is YYYY-MM-DDT00:M00:00
(time component must be equal to midnight).configurationId
(cf “preliminaries” above).endsAt
date carefully when creating a payroll variables export, as you may have calculation rules that handle time on a weekly basis (triggered on sundays).
If so, consider exporting on a Monday at midnight (i.e. “00:00:00”) rather than on the first day of the next month.Track export progress
lastExportId
and exportConfigurationId
retrieved in the “preliminaries” step):generatedExportId = data.items[0].id
.items
array, as your previous request has probably failed.Retrieve the export content