Deletes icons from an icon folder of the profile. Today the only folder is drawing_custom_icons, the custom icon set of the Drawing element.
Request body
A single { "url": ... } object or a JSON array of them, using the urls returned by GET or POST on this path.
Scope
Only the file name (the part after the last /) of each url is used. The object deleted is always {servername}/{profile_id}/{folder}/{file name}, so a url cannot reach another folder or another profile. A file name that does not exist in the folder is not reported as an error.
Storage failures
Each icon whose file storage fails to remove is reported, and its file is still served at its url. A single { "url": ... } object answers 502. An array answers per item: 207 when some icons were removed, 400 when none were.
Authorization
Restricted to internal client apps, the same as DELETE /profiles/{profile_id}/icons.
Responses
-
OK - the icons were deleted. One url in the request returns a single
IconOutcome; more than one returns an array, in request order. -
Multi-Status - an array request where storage removed some icons and failed to remove others. The body has the same shape as
200; failed items carryerror_messageinstead ofurl, and their files are still in storage. -
Bad Request - an item has no
url, an emptyurl, or aurlwith no plain file name; nothing is deleted. Or an array request where storage failed to remove every icon; the body then has the same shape as200, with anerror_messageon each item. -
Unauthorized - missing or invalid bearer token.
-
Forbidden - the token is not from an internal client app, or
profile_idis not the caller's own profile. -
Not Found -
folderis not an allowed icon folder, orprofile_iddoes not exist. -
Bad Gateway - a single-object request whose icon file storage failed to remove. The file is still in storage, and the body carries
error_message.
curl \
--request DELETE 'https://api.iformbuilder.com/exzact/api/v81/[servername]/profiles/self/icons/drawing_custom_icons' \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {access_token}" \
--data '{
"url": "https://zerion-iform-icons-example.s3.amazonaws.com/app/67890/drawing_custom_icons/field_17306240006721a2f0b1c3d.png"
}'
{
"url": "https://zerion-iform-icons-example.s3.amazonaws.com/app/67890/drawing_custom_icons/field_17306240006721a2f0b1c3d.png"
}
[
{
"url": "https://zerion-iform-icons-example.s3.amazonaws.com/app/67890/drawing_custom_icons/field_17306240006721a2f0b1c3d.png"
},
{
"url": "https://zerion-iform-icons-example.s3.amazonaws.com/app/67890/drawing_custom_icons/field_17306240117721a2f0c4e5f.jpeg"
}
]
{
"url": "https://zerion-iform-icons-example.s3.amazonaws.com/app/67890/drawing_custom_icons/field_17306240006721a2f0b1c3d.png"
}
[
{
"url": "https://zerion-iform-icons-example.s3.amazonaws.com/app/67890/drawing_custom_icons/field_17306240006721a2f0b1c3d.png"
},
{
"error_message": "Cannot delete icon file [field_17306240117721a2f0c4e5f.jpeg]"
}
]
[
{
"error_message": "Cannot delete icon file [field_17306240006721a2f0b1c3d.png]"
},
{
"error_message": "Cannot delete icon file [field_17306240117721a2f0c4e5f.jpeg]"
}
]
{
"error_message": "Cannot delete icon file [field_17306240006721a2f0b1c3d.png]"
}