Purpose
This WS is designed to return details of Device definition using its identifier.
Used to return device definition with the old structure only.
Will be deprecated
Specification
Filters
Filter | Values | Type | Description | Example |
---|---|---|---|---|
id | String | Device definition identifier |
|
Logic
Service returns device_definitions filtered by ID:
Get all device_definitions (PRM database) where device_definitions.classification_type is not empty.
Get data from program_devices (PRM database) with following params:
device_definition_id =
id
from URLis_active = true
start_date <= current date()
end_date >= current_date(), if not null
Render a response according to specification
Authorize
Verify the validity of access token
Return (401, 'Invalid access token') in case of validation fails
Verify that token is not expired
in case of error - return (401, 'Invalid access token')
Check user scopes in order to perform this action (scope = 'device_definitions:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: device_definition
s:read') in case of invalid scope(s)
Validate device definition
Check that device definition with such ID exists in the system
in case of error - return 404 ('Device definition is not found')
Check device_definitions.classification_type field is not empty.
in case of error - return 409 ('Use v2 route for this device definition')
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
api-key:uXhEczJ56adsfh3Ri9SUkc4en
Response structure
See on Apiary