Create Icon entity through the api

hi @macbeth,

Sorry for the late response. It is permission error. API user doesn’t allow to create Icon. I tried to use human user to run the script. It works. I don’t what data you used for sourceIcon['image_data']. If it is a image path like sg.create(‘Icon’, {‘name’: ‘new_icon_name’, ‘image_data’: ‘a.jpg’}), after you run the script, shotgun site would be crashed.

The correct way to use this api is

sg.create('Icon', {'name': 'New Icon 99', 'icon_type': 'custom_status', 'display_type': 'image', 'image_data': '<hex_encoded_16px_wide_jpg>'}).

May I ask what is your use case? We will decide to disable this dangers api or update document.

Thanks

Loney

1 Like