Icon admin API Resource

icons related WS

POST /admin/icon

Upsert icon to icon repository.

Request Parameters
name type description default constraints
id query ID for the icon being updated.   long
name query Name for an icon, if not provided filename is used.    
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json object JSON with result and id

Example of response:

{ "success": true, "report": [{ "fileName": "aler.svg", "name": "Alert!", "errorName": "FileAlreadyExistsError", "errorCodeNumber": 11303, "success": false},{ "fileName": "alert.svg", "name": "Alert!", "success": true}]}

POST /admin/icon/category

Add category

Request Body
media type data type
*/* object
Response Body
media type data type description
application/json object JSON with result

Example of response:

{"success":true}

PUT /admin/icon/category

Update category

Request Body
media type data type
*/* object
Response Body
media type data type description
application/json object JSON with result

Example of response:

{"success":true}

POST /admin/icon/export

Download icons as a zip file.

Request Body
media type data type description
application/json object Composed of icon list for downloading selected icons and flag for downloading all of them.
Response Body
media type data type description
application/zip object

POST /admin/icon/import

Upload icons as a zip file.

Request Body
media type data type description
application/zip object A multipart entity containing icons packed in a zip file.
multipart/form-data (custom)
Response Body
media type data type description
*/* object

GET /admin/icon/tag

Get tags for given icon.

Request Parameters
name type description default constraints
iconId query - icon id   long
Response Body
media type data type description
application/json object - list of icon tags (categories)

Example of response:

{"list":[{"dictKey":"45"}]}

PUT /admin/icon/update

Sets a new icon name for the icon already uploaded.

Request Parameters
name type description default constraints
id query ID of the icon in the DB.   long
name query A new name for the icon.    
Response Body
media type data type description
*/* object

DELETE /admin/icon/{iconId}

delete icon from icon repository

Request Parameters
name type description default constraints
iconId path   long
Response Body
media type data type description
application/json object JSON with result

Example of response:

{"success":true}

GET /admin/icon/categories/json

Get icon categories.

Response Body
media type data type description
application/json object - list of all categories that can be attached to icons as tags

Example of response:

{"dictId":"categories","list":[{"dictKey":"43","dictValue":"Fire"},{"dictKey":"45","dictValue":"Change Requests"},{"dictKey":"44","dictValue":"Logo"},{"dictKey":"46","dictValue":"Installation"}]}

DELETE /admin/icon/category/{categoryKey}

Remove category

Request Parameters
name type description default constraints
categoryKey path   long
Response Body
media type data type description
application/json object JSON with result

Example of response:

{"success":true}

GET /admin/icon/list/json

Get icons from icon repository.

Response Body
media type data type description
application/json object

DELETE /admin/icon/tag/{categoryId}

Remove icon category tag

Request Parameters
name type description default constraints
categoryId path   int
iconId query   int
Response Body
media type data type description
application/json object JSON with result

Example of response:

{"success":true}

POST /admin/icon/tag/{categoryId}

Add category tag for icon

Request Parameters
name type description default constraints
categoryId path   int
iconId query   int
Response Body
media type data type description
application/json object JSON with result

Example of response:

{"success":true}