REST APIeasy-svg-pro/v1/library/usage

easy-svg-pro/v1/library/usage

Counts how many places still call each of up to 25 icon addresses.

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

POST /wp-json/easy-svg-pro/v1/library/usage

Example

curl -u admin:app-password -H 'Content-Type: application/json' -d '{"refs":["acme/arrow"]}' https://example.com/wp-json/easy-svg-pro/v1/library/usage

Description

Asked before an icon is removed, so the screen can say what removing it will blank. Addresses are normalised to collection/slug and duplicates counted once. truncated is true when the search hit its limit or more than 25 addresses were sent, so treat counts as a lower bound then. Permission: Requires manage_options, an active licence and the editor feature (Icon set editor) switched on.

Permission: Requires manage_options, an active licence and the editor feature (Icon set editor) switched on.

Parameters

body
refsarray<string>
Required

Icon addresses, collection/slug, 1 to 25.

Return value

returnWP_REST_Response|WP_Error

refs (canonical address to number of places), places (their sum) and truncated.

Response

refs (canonical address to number of places), places (their sum) and truncated.

{
  "refs": {
    "acme/arrow": 3
  },
  "places": 3,
  "truncated": false
}