Retrieve an activity duration

Retrieve an activity duration

Returns a single activity durations record by its internal ID.

Tip

Check the Swagger page for more technical information on the endpoints.

Endpoint details

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/activity-durations/{id}

Headers: Authorization: Bearer {token}, User-Agent: {agent} Scope: connector-protimeapi-activity-durations.read

URL parameters

Parameter Description
<id> The internal ID of the activity duration. IDs can be found in the list endpoint response.

Response properties

Field Type Required Writable Description
changeVersion string — Read-only Property to indicate the order of changes.
id integer — Read-only Unique identifier for the activity duration.
person.id integer — Read-only Unique identifier of the person linked to this duration.
date string — Read-only Date of the activity duration (YYYY-MM-DD).
durationInMinutes integer — Read-only Duration in minutes for the activity.
activityLevels.level integer — Read-only A list of levels in the activity structure of the registered activity definition.
activityLevels.activityDefinition.id string — Read-only Unique identifier for the activity definition registered.
shiftDefinition.id integer — Read-only Unique identifier for the shift definition, if a shift is linked to the duration.
absenceDefinition.id integer — Read-only Unique identifier for the absence definition, if an absence is linked to the duration.
counterDefinitions.id integer — Read-only A list of unique identifiers for the counter definitions or multiple definitions, if one or more counters are linked to this duration.
request.id string — Read-only Unique identifier for the request, if the duration was requested.
status string — Read-only Status of the activity duration (Unknown, Auto, Manual).
isAuthorized boolean — Read-only Indicates if the activity duration is authorized.

External references

The endpoint supports predefined and custom external references. See the external references page for details.

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
absence-definitions @absence-code Supported
counter-definitions @counter-code Supported
shift-definitions @shift-code Supported

Error responses

Status Condition
401 Missing or invalid access token, or insufficient scope
404 Activity duration with the given ID does not exist

Examples

With an external reference

An example retrieving an activity duration by ID 123 with external references:

GET
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/activity-durations/123?externalReferences=(people,@employee-number)(activity-definitions,@data-entry-code)