Icon admin API Resource

icons related WS

POST /api/admin/icon

Upsert icon to icon repository.

Request Parameters
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.  
Request Body
media type data type
multipart/form-data (custom)
Response Body
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}]}

Example

Request
POST /api/admin/icon
Content-Type: multipart/form-data
Accept: application/json

                

                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "success" : true,
  "id" : 12345,
  "errorCodeNumber" : 12345,
  "name" : "...",
  "errorName" : "NoUserForTokenError",
  "fileName" : "..."
}
                
              

POST /api/admin/icon/category

Add category

Request Body
media type data type
application/json HdcDictItemModelTO (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON with result

Example of response:

{"success":true}

Example

Request
POST /api/admin/icon/category
Content-Type: application/json
Accept: application/json

                
{ }
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{ }
                
              

PUT /api/admin/icon/category

Update category

Request Body
media type data type
application/json HdcDictItemModelTO (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON with result

Example of response:

{"success":true}

Example

Request
PUT /api/admin/icon/category
Content-Type: application/json
Accept: application/json

                
{ }
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

POST /api/admin/icon/export

Download icons as a zip file.

Request Body
media type data type description
application/json IconsPayload (JSON) 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

Example

Request
POST /api/admin/icon/export
Content-Type: application/json
Accept: application/zip

                
{
  "iconsIds" : [ 12345, 12345 ],
  "all" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/zip

                
...
                
              

POST /api/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
application/json IconsUploadReport (JSON)

Example

Request
POST /api/admin/icon/import
Content-Type: application/zip
Accept: application/json

                
...
                
              
Response
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 /api/admin/icon/tag

Get tags for given icon.

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

Example of response:

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

Example

Request
GET /api/admin/icon/tag
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ { } ]
                
              

PUT /api/admin/icon/update

Sets a new icon name for the icon already uploaded.

Request Parameters
name type description 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
application/json HdcSuccessWithId (JSON)

Example

Request
PUT /api/admin/icon/update
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

DELETE /api/admin/icon/{iconId}

delete icon from icon repository

Request Parameters
name type description constraints
iconId path long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON with result

Example of response:

{"success":true}

Example

Request
DELETE /api/admin/icon/{iconId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

GET /api/admin/icon/categories/json

Get icon categories.

Response Body
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"}]}

Example

Request
GET /api/admin/icon/categories/json
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

DELETE /api/admin/icon/category/{categoryKey}

Remove category

Request Parameters
name type description constraints
categoryKey path long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON with result

Example of response:

{"success":true}

Example

Request
DELETE /api/admin/icon/category/{categoryKey}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

GET /api/admin/icon/list/json

Get icons from icon repository.

Response Body
media type data type description
application/json HdcIconListTO (JSON)

Example

Request
GET /api/admin/icon/list/json
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{ }
                
              

DELETE /api/admin/icon/tag/{categoryId}

Remove icon category tag

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

Example of response:

{"success":true}

Example

Request
DELETE /api/admin/icon/tag/{categoryId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

POST /api/admin/icon/tag/{categoryId}

Add category tag for icon

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

Example of response:

{"success":true}

Example

Request
POST /api/admin/icon/tag/{categoryId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{ }