easy-svg-pro/v1/history/library/restore
Puts a free library icon back to an earlier drawing.
REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/history/history.php
Usage
POST /wp-json/easy-svg-pro/v1/history/library/restore
Example
curl -X POST "https://example.com/wp-json/easy-svg-pro/v1/history/library/restore" \
-H "X-WP-Nonce: $NONCE" -b "$COOKIES" \
-H "Content-Type: application/json" \
-d '{"icon": "arrow", "version": 512}'
Description
The revision must belong to that icon, otherwise 400 easy_svg_pro_wrong_version. The bytes are written through the free plugin's own update function, which runs the site's sanitizer again, so a restored drawing can still be refused. The icon's name never changes. Needs a free plugin that offers that write, otherwise 409 easy_svg_pro_free_too_old.
Permission: manage_options and an active licence with the Icon history feature switched on under Icons, Features.
Parameters
The library icon, by its slug.
The revision id to put back. Minimum 1.
Return value
{state, icon, message}. state is restored or refused_sanitiser.
Response
{state, icon, message}. state is restored or refused_sanitiser.
{
"state": "restored",
"icon": "arrow",
"message": "..."
}