Introduction
It is possible to modify the icons used for internal types using the built in API. This allows you to update existing icons, or add icons for internal types that do not have icons. The APIs in question are as follows, one to update existing or add new icon mappings, and one to export any custom mappings that have been made
/imaging/api/domains/{tenantName}/type/icons/update (POST) /imaging/api/domains/{tenantName}/type/icons/export (GET - default export to .json) /imaging/api/domains/{tenantName}/type/icons/export?filetype=csv (GET - export to .csv)
Both APIs are available in the interactive API documentation where they can be tested:
Update API - POST
The Update API is used to update existing or add new icon mappings:
/imaging/api/domains/{tenantName}/type/icons/update
This API requires the following raw body to be sent:
[ { "id":<id>, "typnam":"<type_name>", "familyicon":"<family_icon>", "genericicon":"<generic_icon>" }, { "id":<id>, "typnam":"<type_name>", "familyicon":"<family_icon>", "genericicon":"<generic_icon>" } ]
For example, you could send the following to change the icon mapping for an existing PB_WINDOW internal type to use the same icon used for a Procedure:
[ { "id":33, "typnam":"PB_WINDOW", "familyicon":"Procedure", "genericicon":"Procedure" } ]
The following message indicates that the mapping has successfully been created:
"success": "Relationship(s) created between type and icon successfully."
Export API - GET
The Export API is used to export the list of any custom mappings that have been made. By default, the export API will export in .json format. You can also specify .CSV format if required:
/imaging/api/domains/{tenantName}/type/icons/export (GET - default export to .json) /imaging/api/domains/{tenantName}/type/icons/export?filetype=csv (GET - export to .csv)