- Home
- Resources
- Dictionary admin API
HDC administrator Dictionary Web Service
POST /api/admin/dictionary
Add dictionary.
Example of request:
{"name":"area types"}
Request Body
media type |
data type |
description |
application/json |
HdcDictionaryModelTO
(JSON) |
The specification of dictionary that has to be added. |
Response Body
media type |
data type |
description |
application/json |
HdcDictionaryModelTO
(JSON) |
JSON with added dictionary attributes (id, name).
{"id":"created dictionary id", "name":"name of dictionary"}
|
Example
Request
POST /api/admin/dictionary
Content-Type: application/json
Accept: application/json
{ }
Response
HTTP/1.1 201 Created
Content-Type: application/json
{ }
POST /api/admin/dictionary/import
Request Parameters
name |
type |
description |
constraints |
skipMatched |
query |
|
boolean |
Request Body
media type |
data type |
multipart/form-data |
(custom)
|
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
POST /api/admin/dictionary/import
Content-Type: multipart/form-data
Accept: application/json
Response
HTTP/1.1 201 Created
Content-Type: application/json
...
GET /api/admin/dictionary/json
Get list of all dictionaries
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
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"}]}
|
Example
Request
GET /api/admin/dictionary/json
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
DELETE /api/admin/dictionary/{dictionaryId}
Delete dictionary.
Request Parameters
name |
type |
description |
constraints |
dictionaryId |
path |
ID of dictionary |
long |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information, whether the removing has or has not
been succeeded. |
Example
Request
DELETE /api/admin/dictionary/{dictionaryId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
PUT /api/admin/dictionary/{dictionaryId}
Update dictionary.
Example of request:
{"name":"area types"}
Request Parameters
name |
type |
description |
constraints |
dictionaryId |
path |
|
long |
Request Body
media type |
data type |
description |
application/json |
HdcDictionaryModelTO
(JSON) |
The specification of dictionary that has to be updated. |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information, whether the updating has or has not
been succeeded. |
Example
Request
PUT /api/admin/dictionary/{dictionaryId}
Content-Type: application/json
Accept: application/json
{ }
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
GET /api/admin/dictionary/exportall/xls
Response Body
media type |
data type |
description |
application/vnd.ms-excel |
object
|
|
Example
Request
GET /api/admin/dictionary/exportall/xls
Content-Type: */*
Accept: application/vnd.ms-excel
...
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.ms-excel
...
POST /api/admin/dictionary/exportall/xls
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
POST /api/admin/dictionary/exportall/xls
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
...
POST /api/admin/dictionary/item/{dictId}
Create new dictionary item
Request Parameters
name |
type |
description |
constraints |
dictId |
path |
Unique identifier of dictionary |
long |
Request Body
media type |
data type |
description |
application/json |
HdcDictItemModelTO
(JSON) |
HdcDictItemModelTO |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information of operations's success |
Example
Request
POST /api/admin/dictionary/item/{dictId}
Content-Type: application/json
Accept: application/json
{ }
Response
HTTP/1.1 201 Created
Content-Type: application/json
{ }
PUT /api/admin/dictionary/item/{dictId}
Update specified dictionary item
Request Parameters
name |
type |
description |
constraints |
dictId |
path |
Unique identifier of dictionary |
long |
Request Body
media type |
data type |
description |
application/json |
HdcDictItemModelTO
(JSON) |
HdcDictItemModelTO
Example of request:
{"dictKey":"Badrum","dictValue":"Badrum","seq":0}
|
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information of operations's success |
Example
Request
PUT /api/admin/dictionary/item/{dictId}
Content-Type: application/json
Accept: application/json
{ }
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
GET /api/admin/dictionary/json/{dictId}
Get contents of specified dictionary
Request Parameters
name |
type |
description |
constraints |
dictId |
path |
Unique identifier of dictionary |
long |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
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}]}
|
Example
Request
GET /api/admin/dictionary/json/{dictId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
GET /api/admin/dictionary/export/xls/{dictId}
Request Parameters
name |
type |
description |
constraints |
dictId |
path |
|
long |
Response Body
media type |
data type |
description |
application/vnd.ms-excel |
object
|
|
Example
Request
GET /api/admin/dictionary/export/xls/{dictId}
Content-Type: */*
Accept: application/vnd.ms-excel
...
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.ms-excel
...
POST /api/admin/dictionary/export/xls/{dictId}
Request Parameters
name |
type |
description |
constraints |
dictId |
path |
|
long |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
POST /api/admin/dictionary/export/xls/{dictId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
...
PUT /api/admin/dictionary/item/reorder/{dictId}
Update specified dictionary items
Request Parameters
name |
type |
description |
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
(JSON) |
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information of operations's success |
Example
Request
PUT /api/admin/dictionary/item/reorder/{dictId}
Content-Type: application/json
Accept: application/json
...
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
DELETE /api/admin/dictionary/item/{dictId}/{dictItemId}
Delete specified dictionary item
Request Parameters
name |
type |
description |
constraints |
dictId |
path |
Unique identifier of dictionary |
long |
dictItemId |
path |
identifier of dictionary item |
|
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
JSON Response with information of operations's success |
Example
Request
DELETE /api/admin/dictionary/item/{dictId}/{dictItemId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }