Retrieve a list
Introduction
You can retrieve a list of assignments using a filter.
Tip
Check the Swagger page for more technical information on the endpoints.
Endpoint details
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments
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. |
Filters
This list of filters can be used for this endpoint. Some filters are mandatory.
| Filter | Type | Description |
|---|---|---|
person |
Optional | Filter by specific person IDs |
date |
Required | Date range (required). Filters assignments based on the from date property. |
Check the Fetching Resources page on how to use the filter.
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 |
Examples
Filter on date range
Example with a date range:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments?filter=date ge '2025-01-01' and date le '2025-01-31'
Filter on date range with external reference
Example with a date range and the employee number as the external reference for people:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments?filter=date ge '2025-01-01' and date le '2025-01-31'&externalReferences=(people,@employee-number)
Filter on people and date range
Example with a filter on specific people and a date range:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments?filter=person in (1,2,3) and date ge '2025-01-01' and date le '2025-01-31'
Filter on people in organisational groups
Example with a filter on people in organisational groups and a date range:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments?filter=person in org-group (200,201) and date ge '2025-01-01' and date le '2025-01-31'
Filter on people and date range with multiple external references
Example with a filter on a few people, a date range and multiple external references:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/assignments?filter=person in (1,2,3) and date ge '2025-01-01' and date le '2025-01-31'&externalReferences=(people,@employee-number)(activity-definitions,@data-entry-code)