Provides information about the worktime periods and the status of the workflow
This resource provides information about a worktime period:
This resource is read-only. Signature can be created and deleted using the Worktime period signature service.
https://timesaver.ch/app/rest/mandators/<mandator id>/worktimePeriods[/worktime period id]
This will return all of the worktime periods of the mandator with id 59
GET https://timesaver.ch/app/rest/mandators/59/worktimePeriods Authorization: Basic aW5mb0B0aW1lc2F2ZXIuY2g6czNjcjN0 Accept: application/json
Content-Type: application/json;charset=UTF-8
[ { "class": "timecloud.Worktimeperiod", "id": 3630, "start": "2018-05-31T22:00:00Z", "end": "2018-06-29T22:00:00Z", "mandator": { "class": "timecloud.Mandator", "id": 423, "name": "Timesaver" }, "workflowstatusSet": [ { "class": "timecloud.Workflowstatus", "id": 1886, "user": { "class": "timecloud.User", "id": 485, "email": "info@timesaver.ch", "name": "Muster", "prename": "Hans" }, "entriesTestResults": [ { "class": "timecloud.WfStatusEntTestRes", "id": 48727, "testDate": "2018-06-21T08:01:48Z", "referenceDate": "2018-06-20T22:00:00Z", "forRole": { "class": "timecloud.Systemrole", "id": 2, "key": "role.user", "name": "Employee" }, "messageType": "E", "messageTablename": "t_entries_test", "messageKey": "productivity" }, { "class": "timecloud.WfStatusEntTestRes", "id": 48726, "testDate": "2018-06-21T08:01:48Z", "referenceDate": "2018-05-31T22:00:00Z", "forRole": { "class": "timecloud.Systemrole", "id": 2, "key": "role.user", "name": "Employee" }, "messageType": "E", "messageTablename": "t_entries_test", "messageKey": "worktime_end" } ] } ] }, { "class": "timecloud.Worktimeperiod", "id": 3631, "start": "2018-06-30T22:00:00Z", "end": "2018-07-30T22:00:00Z", "mandator": { "class": "timecloud.Mandator", "id": 423, "name": "Timesaver" }, "workflowstatusSet": [] } ]
This will return all worktime periods that have a start date greater or equals than the first of june 2018, GMT+2, a end date that is before or equal to the 30th of june 2018, GMT+2 and this will only returns result for the user with the id 485.
GET https://timesaver.ch/app/rest/mandators/423/worktimePeriods?filter.start.begin=2018-05-31T22:00:00Z&filter.end.end=2018-06-30&filter.user=485 Authorization: APIKey ZWE2YmUxNTUtNjJhMy00ZTJhLWEyYTgtODYzOTM5NDQyZTE3OjQyMw== Accept: application/json
Content-Type: application/json;charset=UTF-8
[ { "class": "timecloud.Worktimeperiod", "id": 3630, "start": "2018-05-31T22:00:00Z", "end": "2018-06-29T22:00:00Z", "mandator": { "class": "timecloud.Mandator", "id": 423, "name": "Timesaver" }, "workflowstatusSet": [ { "class": "timecloud.Workflowstatus", "id": 1886, "user": { "class": "timecloud.User", "id": 485, "email": "info@timesaver.ch", "name": "Muster", "prename": "Hans" }, "entriesTestResults": [ { "class": "timecloud.WfStatusEntTestRes", "id": 48727, "testDate": "2018-06-21T08:01:48Z", "referenceDate": "2018-06-20T22:00:00Z", "forRole": { "class": "timecloud.Systemrole", "id": 2, "key": "role.user", "name": "Employee" }, "messageType": "E", "messageTablename": "t_entries_test", "messageKey": "productivity" }, { "class": "timecloud.WfStatusEntTestRes", "id": 48726, "testDate": "2018-06-21T08:01:48Z", "referenceDate": "2018-05-31T22:00:00Z", "forRole": { "class": "timecloud.Systemrole", "id": 2, "key": "role.user", "name": "Employee" }, "messageType": "E", "messageTablename": "t_entries_test", "messageKey": "worktime_end" } ] } ] } ]
GET https://timesaver.ch/app/rest/mandators/423/worktimePeriods/3630 Authorization: APIKey ZWE2YmUxNTUtNjJhMy00ZTJhLWEyYTgtODYzOTM5NDQyZTE3OjQyMw== Accept: application/json
Content-Type: application/json;charset=UTF-8
{ "class": "timecloud.Worktimeperiod", "id": 3630, "start": "2018-05-31T22:00:00Z", "end": "2018-06-29T22:00:00Z", "mandator": { "class": "timecloud.Mandator", "id": 423, "name": "Timesaver" }, "workflowstatusSet": [ { "class": "timecloud.Workflowstatus", "id": 1886, "user": { "class": "timecloud.User", "id": 485, "email": "info@timesaver.ch", "name": "Muster", "prename": "Hans" }, "entriesTestResults": [ { "class": "timecloud.WfStatusEntTestRes", "id": 48727, "testDate": "2018-06-21T08:01:48Z", "referenceDate": "2018-06-20T22:00:00Z", "forRole": { "class": "timecloud.Systemrole", "id": 2, "key": "role.user", "name": "Employee" }, "messageType": "E", "messageTablename": "t_entries_test", "messageKey": "productivity" }, { "class": "timecloud.WfStatusEntTestRes", "id": 48726, "testDate": "2018-06-21T08:01:48Z", "referenceDate": "2018-05-31T22:00:00Z", "forRole": { "class": "timecloud.Systemrole", "id": 2, "key": "role.user", "name": "Employee" }, "messageType": "E", "messageTablename": "t_entries_test", "messageKey": "worktime_end" } ] } ] }