Retrieve an assignment
Introduction
You can retrieve an assignment by the internal ID using the GET call. Internal IDs for assignments can be found by listing all assignments using the GET collection endpoint.
Tip
Check the Swagger page for more technical information on the endpoints.
Endpoint details
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments/{id}
URL parameters
This parameter needs to be filled in when calling this endpoint.
| Parameter | Description |
|---|---|
<id> |
The internal ID of the assignment. |
Response properties
This list of properties is returned by this endpoint.
| Property | Type | Description |
|---|---|---|
changeVersion |
string | Property to indicate the order of changes. |
id |
integer | Internal unique identifier for the assignment. |
person.id |
integer | Internal ID of the person who the assignment is for. |
from |
string | Start date of the assignment (YYYY-MM-DD). |
until |
string | End date of the assignment (YYYY-MM-DD). |
startTimeInMinutes |
integer | Start time in minutes since midnight. |
endTimeInMinutes |
integer | End time in minutes since midnight. |
breakDurationInMinutes |
integer | Duration of the break in minutes. |
comments |
string | Comments associated with the assignment. |
activityLevels.level |
integer | A list of levels in the activity structure of the registered activity definition. |
activityLevels.activityDefinition.id |
string | Unique identifier for the activity definition registered. |
External references
It’s possible to use predefined external references and custom external references. More information can be found on the External References Page.
The following collections are supported for this endpoint:
| Collection | Predefined | Custom |
|---|---|---|
people |
@badge-number, @employee-number |
Supported |
activity-definitions |
@data-entry-code, @external-reference |
Supported |
Caution
There are some restrictions on the characters allowed in URL requests. See the fetching resources page for more information.
Examples
Retrieving an assignment by internal ID
Example with internal ID 757085:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments/757085
With external reference for people
Example with internal ID 757085 and external reference for people:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments/757085?externalReferences=(people,@employee-number)
With multiple external references
Example with internal ID 757085 and external references for people and activity definitions:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments/757085?externalReferences=(people,@employee-number)(activity-definitions,@data-entry-code)