Retrieve a counter definition
Introduction
You can retrieve a counter definition by the internal ID or an external reference using the GET call. Internal IDs for counter definitions can be found by listing all counter definitions 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/counter-definitions/{counterDefinitionReference}
URL parameters
This parameter needs to be filled in when calling this endpoint.
| Parameter | Description |
|---|---|
<counterDefinitionReference> |
The internal ID or external reference of the counter definition. |
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 counter definition. |
name.default |
string | Default name value of the counter definition. |
name.translations |
object | A list of translated names of the definition by language code. |
code |
string | A counter code used for this definition. |
friendlyName.default |
string | Default friendly name value for this definition shown to users. |
friendlyName.translations |
object | A list of translated friendly names by language code. |
friendlyCode.default |
string | Default friendly code value for this definition shown to users. |
friendlyCode.translations |
object | A list of translated friendly codes by language code. |
isEnabled |
boolean | Indicates if the counter definition is enabled in myProtime. |
counterGroup.id |
integer | The ID of the associated counter group. |
unit |
string | The unit type for the counter definition (Unknown, Interval, Duration, Instance). |
External references
It’s possible to use predefined external references and custom external references. More information can be found on the External References Page
For a list of predefined external references, see the external reference options section.
Note
Check the query options below the endpoint on the Swagger page for the relevant external references.
Caution
There are some restrictions on the characters allowed in URL requests. See the fetching resources page for more information.
Examples
Retrieving a counter definition by internal ID
Example with internal ID 9:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/counter-definitions/9
Retrieving a counter definition by external reference
Example with counter code O200:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/counter-definitions/O200?externalReferences=(counter-definitions,@counter-code)
With custom external reference
Example with custom external reference 766:
https://<tenant>.myprotime.eu/connector/protimeapi/api/v1/counter-definitions/766?externalReferences=(counter-definitions,customCounterCode)