ЕСОЗ - публічна документація
Get equipment list
Purpose
This WS is designed to return list of all active equipments related to legal entity. It is also allow to search for some equipments by search criteria
Specification
Link | Посилання на Apiary або Swagger | |
Resource | /api/equipment | Посилання на ресурс, наприклад: /api/persons/create |
Scope | equipment:read | Scope для доступу |
Components | Devices and equipment | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription |
Microservices | API paragraph not found | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC |
Protocol type | REST | Тип протоколу, який використовується запитом, наприклад: SOAP | REST |
Request type | GET | Тип запиту API, наприклад: GET, POST, PATCH… |
Sync/Async | Sync | Метод є синхронним чи асинхронним? |
Public/Private/Internal | Public | Потрібно зазначити тип методу за ступенем доступності |
Logic
Service returns all equipments related to legal_entity and filtered by passed query parameters:
Get all equipments (PRM database)
Filter by legal_entity (extract
client_id
from token)Filter list by passed search parameters (according to spec.)
Search using like operation. Case insensitive
Preload equipment names from
prm.equipment_names
Render a response according to specification
Filters
See on Apiary
Request structure
API paragraph not found
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 = 'equipment:read')
Return (403, 'Your scope does not allow to access this resource. Missing allowances: equipment:read') in case of invalid scope(s)
Headers
Наприклад:
Content-Type:application/json
Authorization:Bearer c2778f3064753ea70de870a53795f5c9
api-key:uXhEczJ56adsfh3Ri9SUkc4en
Request data validation
API paragraph not found
Processing
API paragraph not found
Response structure
Example:
HTTP status codes
HTTP status code | Message | What caused the error |
---|---|---|
200 | Response |
|
ЕСОЗ - публічна документація