easy-svg/v1/library
Lists the stored icons with their hardened markup, optionally searched.
REST endpoint · Easy SVG · Status: Internal · Defined in includes/panel.php
Usage
GET /wp-json/easy-svg/v1/library
Example
curl 'https://example.com/wp-json/easy-svg/v1/library?search=arrow' \
-H 'X-WP-Nonce: <nonce>'
Description
Returns up to 500 icons, oldest first, as easy_svg_panel_library_payload() builds them. search matches the title and the slug, never the markup. Without search, total is the number of published icons and truncated says the list was cut; with search, total is the match count. The route works whether or not the icon library switch is on.
Permission: manage_options (easy_svg_panel_rest_permission)
Parameters
Narrow to icons whose name or slug contains this.
Response
items (id, slug, label, content), total and truncated. The list is capped at 500 icons.
{
"items": [
{
"id": 42,
"slug": "heart",
"label": "Heart",
"content": "<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 21l-8-8a5 5 0 0 1 8-6 5 5 0 0 1 8 6z"/></svg>"
}
],
"total": 1,
"truncated": false
}