Icon mapping admin API Resource

WS for class icon mapping

GET /api/admin/iconmapping/class

Get list of icon class mappings

Response Body
media type data type description
application/json array of HdcClassIconMappingItem (JSON) JSON with list of mappings

Example of response:

{"list":[{"classId":111,"classLabel":"Document","icon":{"id":2940,"name":"hammer.PNG","width":78,"height":97}},{"classId":461,"classLabel":"Equipment","icon":{"id":1927,"name":"1508494112714_1352472640.png","width":94,"height":95}},{"classId":127,"classLabel":"Contract","icon":{"id":2941,"name":"allert.PNG","width":85,"height":83}},{"classId":105,"classLabel":"Building","icon":{"id":1764,"name":"bad-icon.jpg","width":90,"height":90}}]}

Example

Request
GET /api/admin/iconmapping/class
Content-Type: */*
Accept: application/json

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

                
[ {
  "classLabel" : "...",
  "classId" : 12345,
  "icon" : { }
} ]
                
              

DELETE /api/admin/iconmapping/class/{classId}

Unassign icon from class

Request Parameters
name type description constraints
classId path - id of class long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON response with information if unassignment was successful or not

Example

Request
DELETE /api/admin/iconmapping/class/{classId}
Content-Type: */*
Accept: application/json

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

                
{ }
                
              

POST /api/admin/iconmapping/class/{classId}/{iconId}

Assign icon to class

Request Parameters
name type description constraints
classId path - id of class long
iconId path - id of icon long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON response with information if assignment was successful or not

Example

Request
POST /api/admin/iconmapping/class/{classId}/{iconId}
Content-Type: */*
Accept: application/json

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

                
{ }