icons related WS
Upsert icon to icon repository.
name | type | description | constraints |
---|---|---|---|
id | query | ID for the icon being updated. | long |
name | query | Name for an icon, if not provided filename is used. |
media type | data type |
---|---|
multipart/form-data | (custom) |
media type | data type | description |
---|---|---|
application/json | HdcSuccessWithIdAndError (JSON) | 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 /api/admin/icon
Content-Type: multipart/form-data
Accept: application/json
HTTP/1.1 201 Created
Content-Type: application/json
{
"success" : true,
"id" : 12345,
"errorCodeNumber" : 12345,
"name" : "...",
"errorName" : "NoUserForTokenError",
"fileName" : "..."
}
Add category
media type | data type |
---|---|
application/json | HdcDictItemModelTO (JSON) |
media type | data type | description |
---|---|---|
application/json | HdcSuccessTO (JSON) | JSON with result
Example of response:
{"success":true}
|
POST /api/admin/icon/category
Content-Type: application/json
Accept: application/json
{ }
HTTP/1.1 201 Created
Content-Type: application/json
{ }
Update category
media type | data type |
---|---|
application/json | HdcDictItemModelTO (JSON) |
media type | data type | description |
---|---|---|
application/json | HdcSuccessTO (JSON) | JSON with result
Example of response:
{"success":true}
|
PUT /api/admin/icon/category
Content-Type: application/json
Accept: application/json
{ }
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
Download icons as a zip file.
media type | data type | description |
---|---|---|
application/json | IconsPayload (JSON) | Composed of icon list for downloading selected icons and flag for downloading all of them. |
media type | data type | description |
---|---|---|
application/zip | object |
POST /api/admin/icon/export
Content-Type: application/json
Accept: application/zip
{
"iconsIds" : [ 12345, 12345 ],
"all" : true
}
HTTP/1.1 201 Created
Content-Type: application/zip
...
Upload icons as a zip file.
media type | data type | description |
---|---|---|
application/zip | object | A multipart entity containing icons packed in a zip file. |
multipart/form-data | (custom) |
media type | data type | description |
---|---|---|
application/json | IconsUploadReport (JSON) |
POST /api/admin/icon/import
Content-Type: application/zip
Accept: application/json
...
HTTP/1.1 201 Created
Content-Type: application/json
{
"success" : true,
"errorCodeNumber" : 12345,
"report" : [ {
"success" : true,
"id" : 12345,
"errorCodeNumber" : 12345,
"name" : "...",
"errorName" : "DefaultIOError",
"fileName" : "..."
}, {
"success" : true,
"id" : 12345,
"errorCodeNumber" : 12345,
"name" : "...",
"errorName" : "InvalidScheduledPublishDate",
"fileName" : "..."
} ],
"errorName" : "..."
}
Get tags for given icon.
name | type | description | constraints |
---|---|---|---|
iconId | query | - icon id | long |
media type | data type | description |
---|---|---|
application/json | array of HdcDictItemModelTO (JSON) | - list of icon tags (categories)
Example of response:
{"list":[{"dictKey":"45"}]}
|
GET /api/admin/icon/tag
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
[ { } ]
Sets a new icon name for the icon already uploaded.
name | type | description | constraints |
---|---|---|---|
id | query | ID of the icon in the DB. | long |
name | query | A new name for the icon. |
media type | data type | description |
---|---|---|
application/json | HdcSuccessWithId (JSON) |
PUT /api/admin/icon/update
Content-Type: */*
Accept: application/json
...
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
delete icon from icon repository
name | type | description | constraints |
---|---|---|---|
iconId | path | long |
media type | data type | description |
---|---|---|
application/json | HdcSuccessTO (JSON) | JSON with result
Example of response:
{"success":true}
|
DELETE /api/admin/icon/{iconId}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
Get icon categories.
media type | data type | description |
---|---|---|
application/json | object (JSON) | - 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"}]}
|
GET /api/admin/icon/categories/json
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Remove category
name | type | description | constraints |
---|---|---|---|
categoryKey | path | long |
media type | data type | description |
---|---|---|
application/json | HdcSuccessTO (JSON) | JSON with result
Example of response:
{"success":true}
|
DELETE /api/admin/icon/category/{categoryKey}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
Get icons from icon repository.
media type | data type | description |
---|---|---|
application/json | HdcIconListTO (JSON) |
GET /api/admin/icon/list/json
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{ }
Remove icon category tag
name | type | description | constraints |
---|---|---|---|
categoryId | path | int | |
iconId | query | int |
media type | data type | description |
---|---|---|
application/json | HdcSuccessTO (JSON) | JSON with result
Example of response:
{"success":true}
|
DELETE /api/admin/icon/tag/{categoryId}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
Add category tag for icon
name | type | description | constraints |
---|---|---|---|
categoryId | path | int | |
iconId | query | int |
media type | data type | description |
---|---|---|
application/json | HdcSuccessTO (JSON) | JSON with result
Example of response:
{"success":true}
|
POST /api/admin/icon/tag/{categoryId}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 201 Created
Content-Type: application/json
{ }