ЕСОЗ - публічна документація
RC_[UPD] Get Device definition details
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
Link | Посилання на Apiary або Swagger | |
Resource | /api/device_definitions/id | Посилання на ресурс, наприклад: /api/persons/create |
Scope | device_definitions:read | Scope для доступу |
Components | Public. Devices | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices | Devices | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC |
Protocol type | REST | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | GET | Тип запиту API, наприклад: GET, POST, PATCH… |
Sync/Async | Sync | Метод є синхронним чи асинхронним? |
Public/Private/Internal | Public | Потрібно зазначити тип методу за ступенем доступності |
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_definitions: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 version of API')
Headers
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
api-key:uXhEczJ56adsfh3Ri9SUkc4en
Response structure
See on Apiary
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 |
|
|
Related content
ЕСОЗ - публічна документація