ЕСОЗ - публічна документація
RC_[NEW] [Trembita API] Get dictionaries
Purpose
This WS is designed to return a catalog of dictionaries for integration with Trembita. Each dictionary is an object that contains not only a code and description of a value, but also a status of the value. It can represent hierarchical dictionaries with subordinate (child) values
Request
URL: /dictionaries
Method: GET
Headers
Header | Type | Required |
---|---|---|
Uxp-Client | string | True |
Uxp-Service | string | True |
Uxp-Transaction-Id | string | True |
In Parameters (query_parameters)
Name | Type | Cardinality | Description |
---|---|---|---|
name | String | 0..1 | Dictionary name |
is_active | Boolean | 0..1 | Dictionary status |
value_code | String | 0..1 | Code of the dictionary value |
Validations
Validate headers
Check that header
Uxp-Client
exists and is not emptyin case of error - generate response with code 400:
$Response.error.type = “bad_request“
$Response.error.code = “1008”
$Response.error.message = “Missed Uxp-Client header”
Check that header
Uxp-Service
exists and is not emptyin case of error - generate response with code 400:
$Response.error.type = “bad_request“
$Response.error.code = “1009”
$Response.error.message = “Missed Uxp-Service header”
Check that header
Uxp-Transaction-Id
exists and is not emptyin case of error - generate response with code 400:
$Response.error.type = “bad_request“
$Response.error.code = “1010”
$Response.error.message = “Missed Uxp-Transaction-Id header”
Check that header
Uxp-Client
contains 4 strings that are separated by/
symbolin case of error - generate response with code 400:
$Response.error.type = “bad_request“
$Response.error.code = “1011”
$Response.error.message = “Invalid Uxp-Client format”
Check that header
Uxp-Service
contains 4 or 5 strings that are separated by/
symbolin case of error - generate response with code 400:
$Response.error.type = “bad_request“
$Response.error.code = “1012”
$Response.error.message = “Invalid Uxp-Service format”
Check that header
Uxp-Client
exists and is not emptyin case of error - generate response with code 400:
$Response.error.type = “bad_request“
$Response.error.code = “1008”
$Response.error.message = “Missed Uxp-Client header”
Response
Each dictionary is an object that contains code, description and status of the value. It can be represented by a hierarchical structure with subordinate (child) values. Each dictionary has a definite dictionary’s labels and flag ‘is_active’ that define a dictionary status
Service logic
Service returns all dictionaries filtered by submitted parameters from PRM DB (except dictionaries from the list in BIG_DICTIONARIES
config. To get dictionaries from config - set it’s name in “name” query param. If the parameter "name" is specified, then the config is ignored)
Get dictionaries
Filter dictionaries by search params.
Render a response according to specification with found dictionaries.
ЕСОЗ - публічна документація