Retrieve restrictions
Returns a single restrictions record by its internal ID.
Tip
Check the Swagger page for more technical information on the endpoints.
Endpoint details
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/activity-structure-versions/{structureVersionId}/levels/{level}/activity-definitions/{activityDefinitionReference}/restrictions
Headers: Authorization: Bearer {token}, User-Agent: {agent}
Scope: connector-protimeapi-activity-definitions.read
URL parameters
| Parameter | Description |
|---|---|
<structureVersionId> |
The ID of the activity structure. Can be found in the configuration in myProtime. |
<level> |
Defines the level in the structure. |
<activityDefinitionReference> |
The internal ID or an external reference. |
Response properties
| Field | Type | Required | Writable | Description |
|---|---|---|---|---|
changeVersion |
string | Yes | Read-only | Property to indicate the order of changes. |
activityDefinitionId.id |
string | Yes | Read-only | The ID of the activity definition for which the restrictions apply. |
restrictions[].level |
integer | Yes | Read-only | The level in the activity structure to which the restriction applies. |
restrictions[].activityDefinitions[].id |
string | Yes | Read-only | Unique identifier for an activity definition that is restricted at the specified level. |
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 |
|---|---|---|
activity-definitions |
@data-entry-code, @external-reference |
Supported |
activity-restrictions |
@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.
Error responses
| Status code | Description |
|---|---|
| 400 | Bad request — invalid external reference. |
| 404 | Not found — the specified activity definition does not exist. |
Examples
Retrieve restrictions with internal ID
Example retrieving restrictions for activity definition with internal ID 38fc2206-b51f-434a-9c36-9e0esfc5e70e:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/activity-structure-versions/b2347a7a-d60d-446f-b03b-7es2cc8c3281/levels/3/activity-definitions/38fc2206-b51f-434a-9c36-9e0esfc5e70e/restrictions
Retrieve restrictions with external reference
Example retrieving restrictions with data entry code 30002:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/activity-structure-versions/b2347a7a-d60d-446f-b03b-7es2cc8c3281/levels/3/activity-definitions/30002/restrictions?externalReferences=(activity-definitions,@data-entry-code)
Retrieve with external reference in response
Example retrieving restrictions with internal ID 38fc2206-b51f-434a-9c36-9e0esfc5e70e and requesting data entry code in response:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/activity-structure-versions/b2347a7a-d60d-446f-b03b-7es2cc8c3281/levels/3/activity-definitions/38fc2206-b51f-434a-9c36-9e0esfc5e70e/restrictions?externalReferences=(activity-definitions,@data-entry-code)