Dictionary admin API Resource

HDC administrator Dictionary Web Service

POST /admin/dictionary

Add dictionary.

Example of request:

{"name":"area types"}

Request Body
media type data type description
application/json object The specification of dictionary that has to be added.
Response Body
media type data type description
application/json object JSON with added dictionary attributes (id, name).

{"id":"created dictionary id", "name":"name of dictionary"}

POST /admin/dictionary/import

Request Parameters
name type description default constraints
skipMatched query   required boolean
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json object

GET /admin/dictionary/json

Get list of all dictionaries

Response Body
media type data type description
application/json object JSON Response with list of dictionaries

Example of response:

{"list":[{"id":"1","name":"hdt_h1_space_dict2","idField":"ObjDict2_ID","labelField":"ObjDict2_Descr","table":"hdt_h1_space_dict2_mw"},{"id":"2","name":"space_class","idField":"FI2SPACE_CLASS","labelField":"FI2SPACE_CDESCR","table":"space_class_mw"},{"id":"3","name":"space_function","idField":"FI2SPACE_FUNCTION","labelField":"FI2SPACE_FUNCDESCR","table":"space_function_mw"},{"id":"4","name":"space_usageclass","idField":"FI2SPACE_USAGE","labelField":"FI2SPACE_USEDESCR","table":"space_usageclass_mw"},{"id":"5","name":"tblcommonvalue","idField":"CommonID","labelField":"CommonValue","table":"tblcommonvalue_mw"}]}

DELETE /admin/dictionary/{dictionaryId}

Delete dictionary.

Request Parameters
name type description default constraints
dictionaryId path ID of dictionary   long
Response Body
media type data type description
application/json object JSON Response with information, whether the removing has or has not been succeeded.

PUT /admin/dictionary/{dictionaryId}

Update dictionary.

Example of request:

{"name":"area types"}

Request Parameters
name type description default constraints
dictionaryId path   long
Request Body
media type data type description
application/json object The specification of dictionary that has to be updated.
Response Body
media type data type description
application/json object JSON Response with information, whether the updating has or has not been succeeded.

GET /admin/dictionary/exportall/xls

Response Body
media type data type description
application/vnd.ms-excel object

POST /admin/dictionary/exportall/xls

Response Body
media type data type description
application/json object

POST /admin/dictionary/item/{dictId}

Create new dictionary item

Request Parameters
name type description default constraints
dictId path Unique identifier of dictionary   long
Request Body
media type data type description
*/* object HdcDictItemModelTO
Response Body
media type data type description
application/json object JSON Response with information of operations's success

PUT /admin/dictionary/item/{dictId}

Update specified dictionary item

Request Parameters
name type description default constraints
dictId path Unique identifier of dictionary   long
Request Body
media type data type description
*/* object HdcDictItemModelTO

Example of request:

{"dictKey":"Badrum","dictValue":"Badrum","seq":0}
Response Body
media type data type description
application/json object JSON Response with information of operations's success

GET /admin/dictionary/json/{dictId}

Get contents of specified dictionary

Request Parameters
name type description default constraints
dictId path Unique identifier of dictionary   long
Response Body
media type data type description
application/json object JSON Response with content of dictionary

Example of response:

{"dictId":"2","list":[{"dictKey":"00","dictValue":"Undefined","seq":0},{"dictKey":"BIA","dictValue":"BIA","seq":1},{"dictKey":"BOA","dictValue":"BOA"},{"dictKey":"LOA","dictValue":"LOA","seq":2},{"dictKey":"____VA","dictValue":"____VA","seq":3}]}

GET /admin/dictionary/export/xls/{dictId}

Request Parameters
name type description default constraints
dictId path   long
Response Body
media type data type description
application/vnd.ms-excel object

POST /admin/dictionary/export/xls/{dictId}

Request Parameters
name type description default constraints
dictId path   long
Response Body
media type data type description
application/json object

PUT /admin/dictionary/item/reorder/{dictId}

Update specified dictionary items

Request Parameters
name type description default constraints
dictId path Unique identifier of dictionary

Example of request:

[{"dictKey":"Badrum","dictValue":"Badrum","seq":0},{"dictKey":"Hall","dictValue":"Hall","seq":1}]
  long
Request Body
media type data type
application/json string
Response Body
media type data type description
application/json object JSON Response with information of operations's success

DELETE /admin/dictionary/item/{dictId}/{dictItemId}

Delete specified dictionary item

Request Parameters
name type description default constraints
dictId path Unique identifier of dictionary   long
dictItemId path identifier of dictionary item    
Response Body
media type data type description
application/json object JSON Response with information of operations's success