easy-svg-pro/v1/repair/scan
Scans the media library's SVGs from an offset for missing viewBox, editor leftovers, embedded rasters and text.
REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/repair/repair.php
Usage
POST /wp-json/easy-svg-pro/v1/repair/scan
Example
curl -X POST "https://example.com/wp-json/easy-svg-pro/v1/repair/scan" \
-H "X-WP-Nonce: $NONCE" -b "$COOKIES" \
-H "Content-Type: application/json" \
-d '{"offset": 0}'
Description
Starting at offset 0 begins a new report; a later offset continues the stored one. One call reads up to 100 chunks of 50 attachments and returns next, the offset to call again with, or null when done. If another scan started in the meantime the call answers 409 easy_svg_pro_stale_scan.
Permission: manage_options and an active licence with the Repair broken SVGs feature switched on under Icons, Features.
Parameters
Where in the library to carry on from. Minimum 0, default 0.
Return value
{at, scanned, found, unreadable, next, rows: {attachment_id: [{kind, repairable, detail, message}]}}. kind is no_viewbox, ballast, raster, text or too_large; only the first two are repairable.
Response
{at, scanned, found, unreadable, next, rows: {attachment_id: [{kind, repairable, detail, message}]}}. kind is no_viewbox, ballast, raster, text or too_large; only the first two are repairable.
{
"at": 1792800000,
"scanned": 50,
"found": 1,
"unreadable": 0,
"next": 50,
"rows": {
"314": [
{
"kind": "no_viewbox",
"repairable": true,
"detail": "",
"message": "..."
}
]
}
}