REST APIeasy-svg-pro/v1/audit/sources

easy-svg-pro/v1/audit/sources

Reads the last stored scan of the icon library, the icon sets and the icon folders.

REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/core/rest.php

Internal: not part of the promised public surface. It may change without notice.

Usage

GET /wp-json/easy-svg-pro/v1/audit/sources

Example

curl -u admin:app-password https://example.com/wp-json/easy-svg-pro/v1/audit/sources

Description

Returns what /audit/sources/scan stored, without scanning again. Each row says where the icon lives, what the sanitizer would remove and whether it can be cleaned here: library and set icons can, folder icons cannot, because those files belong to a theme or plugin. 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.

Return value

returnWP_REST_Response|WP_Error

The last stored scan: at, scanned, found, unreadable, truncated and rows keyed by ref. An empty object before the first scan.

Response

The last stored scan: at, scanned, found, unreadable, truncated and rows keyed by ref. An empty object before the first scan.

{
  "at": 1792800000,
  "scanned": 300,
  "found": 1,
  "unreadable": 0,
  "truncated": false,
  "rows": {
    "set:42:arrow": {
      "source": "set",
      "label": "Arrow",
      "where": "ACME",
      "cleanable": true,
      "tags": [
        "script"
      ],
      "attrs": [],
      "bad": false
    }
  }
}