post https://example.com/device/v1/devices//usage-sessions
Create a new Usage Session
If patient is null in the request, the patient id will be read from the device entity
Custom attributes can be specified in the request body
The below table describes the request parameters:
Parameter | Type | Mandatory | Description |
---|---|---|---|
deviceId | String | true | |
_startTime | LocalDateTime | true | A UTC date-time in the ISO-8601 format |
_endTime | LocalDateTime | false | A UTC date-time in the ISO-8601 format |
_state | String | true | Supported values are: ACTIVE, DONE, PAUSED, ACTIVATING, PAUSING, RESUMING, STOPPING |
_templateId | UUID | true | The id of a Usage Session template that is configured in the settings service. |
_configuration.{configurationCustomAttribute1} | {configurationCustomAttributes1Type} | false | configuration custom attribute 1 value |
_configuration.{configurationCustomAttributeN} | {configurationCustomAttributesNType} | false | configuration custom attribute N value |
_summary._stopReason | String | false | |
_summary._stopReasonCode | String | false | Supported values are: COMPLETION, GENERAL_DEVICE_ERROR, TIMEOUT |
_summary.{summaryCustomAttribute1} | {summaryCustomAttributes1Type} | false | summary custom attribute 1 value |
_summary.{summaryCustomAttributeN} | {summaryCustomAttributesNType} | false | summary custom attribute N value |
_patient.id | UUID | true | |
<customAttributes1> | <customAttributes1Type> | false | Custom attribute 1 value |
<customAttributesN> | <customAttributesNType> | false | Custom attribute N value |