Get Available Custom Icons API
Require Authentication
This API is used to get available custom icons for the company based on combination of deviceID and token.
URL
api/manageassets/customicons
Required parameter (POST)
- deviceID
- token
Optional parameter (GET)
All optional parameters use GET method. So it should be embedded in the URL, e.g: api/manageassets/customicons?q=icon%20name&o=iconName
- q «contains keyword that want to be looked for. Keyword will search iconName field only»
- o «used to sort data, contains field name. Available value: iconName, total_projects, total_assettype, total_projectpins. Default value: iconName»
- ot «used to sort data, contains sort type. Available value: asc, desc. Default value: asc»
- per_page «indicates how many data that will be displayed in each call. Value must be a number between 1 to 500. Default value: 500»
- offset «indicates the first data index that will be displayed in each call. Value must be a number with minimum value is 0. Default value: 0»
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2"
}
Possible return HTTP status code
- 200
- 401
- 405
Return message
{
"status": "success",
"message": {
"current_parameter": "?per_page=500&offset=0",
"next_parameter": "",
"previous_parameter": "",
"start": 0,
"total": 1,
"lists": [{
"iconID": 12,
"iconName": "sample icon name",
"iconDescription": "",
"iconURL": "6a7c58395eeff2be6569867317cf0e3f.png",
"iconOriginalFileName": "30x30.png",
"iconFileType": "image\/png",
"iconFileSize": 3,
"createdDate": 1448661509,
"creatorUserID": 3,
"total_projects": 1,
"total_assettype": 1,
"total_projectpins": 1,
"iconURL_original": "http:\/\/localhost\/mapmybins\/assets\/uploads\/customicons\/1\/original\/6a7c58395eeff2be6569867317cf0e3f.png",
"iconURL_web": "http:\/\/localhost\/mapmybins\/assets\/uploads\/customicons\/1\/websize\/6a7c58395eeff2be6569867317cf0e3f.png",
"iconURL_app": "http:\/\/localhost\/mapmybins\/assets\/uploads\/customicons\/1\/appsize\/6a7c58395eeff2be6569867317cf0e3f.png"
}]
}
}
Note: use "next_parameter" and "previous_parameter" to go to next or previous result page. Just combine it with the API URL, e.g: "api/manageassets/customicons"+next_parameter or "api/manageassets/customicons"+previous_parameter
iconURL_original is the full URL of the original file uploaded by user.
iconURL_web is the full URL of web-based icon image. Web-based image have a dimension of 30x30.
iconURL_app is the full URL of app-based icon image. App-based image have a dimension of 64x64.