easy-svg-pro/v1/audit/sources/clean
Cleans one stored library or set icon after keeping its original.
REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/core/rest.php
Usage
POST /wp-json/easy-svg-pro/v1/audit/sources/clean
Example
curl -u admin:app-password -H 'Content-Type: application/json' -d '{"ref":"set:42:arrow"}' https://example.com/wp-json/easy-svg-pro/v1/audit/sources/clean
Description
The ref names icon:<id> for a free library icon or set:<id>:<slug> for an icon in a set. A folder ref is refused with 400 easy_svg_pro_not_cleanable: fix that file where it comes from. A set clean takes the set write lock first. 404 easy_svg_pro_no_icon or easy_svg_pro_no_set when the target is gone, 409 when the free plugin is missing or too old. Permission: Requires manage_options, an active licence and the audit feature (SVG cleaner) switched on.
Permission: Requires manage_options, an active licence and the audit feature (SVG cleaner) switched on.
Parameters
Which stored icon to clean: icon:<id> or set:<id>:<slug>.
Return value
state: cleaned, already_clean, refused_malformed, refused, backup_failed, not_found or write_failed.
Response
state: cleaned, already_clean, refused_malformed, refused, backup_failed, not_found or write_failed.
{
"state": "cleaned"
}