Durch die Nutzung unserer Website stimmen Sie der Verwendung von Cookies zu, die timesaver nutzt zur Messung seiner eigenen Werbeaktivitäten und - wenn Sie wünschen - sich automatisch einzuloggen/eingeloggt zu bleiben.
Weitere Informationen / Richtlinien

Worktime period

Provides information about the worktime periods and the status of the workflow


General

This resource provides information about a worktime period:

  • start and end date
  • signatures of the period
  • results of the last run entries test

This resource is read-only. Signature can be created and deleted using the Worktime period signature service.

URL

https://timesaver.ch/app/rest/mandators/<mandator id>/worktimePeriods[/worktime period id]

List all worktime periods

This will return all of the worktime periods of the mandator with id 59

Request

GET https://timesaver.ch/app/rest/mandators/59/worktimePeriods
Authorization: Basic aW5mb0B0aW1lc2F2ZXIuY2g6czNjcjN0
Accept: application/json

Response

Headers

Content-Type: application/json;charset=UTF-8

Body

[
    {
        "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": []
    }
]

Search for worktime periods

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.

Request

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

Response

Headers

Content-Type: application/json;charset=UTF-8

Body

[
    {
        "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 a worktime period by Id

Request

GET https://timesaver.ch/app/rest/mandators/423/worktimePeriods/3630
Authorization: APIKey ZWE2YmUxNTUtNjJhMy00ZTJhLWEyYTgtODYzOTM5NDQyZTE3OjQyMw==
Accept: application/json

Response

Headers

Content-Type: application/json;charset=UTF-8

Body

{
    "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"
                }
            ]
        }
    ]
}