Clear queue entries by type
const url = 'https://example.com/wp-json/wp2/media-converter/v1/queue/clear';const options = { method: 'POST', headers: {'X-WP-Nonce': '<X-WP-Nonce>', 'Content-Type': 'application/json'}, body: '{"type":"all","scope":"site"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/wp-json/wp2/media-converter/v1/queue/clear \ --header 'Content-Type: application/json' \ --header 'X-WP-Nonce: <X-WP-Nonce>' \ --data '{ "type": "all", "scope": "site" }'Clears finished queue entries by type: all, manual, queued, or scheduled. Returns how many were removed.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
Type (queue clear, track kind, etc.).
Queue scope: site or network.
Example
{ "type": "all", "scope": "site"}Responses
Section titled “Responses”Completed-queue cleanup finished.
object
True if completed-queue cleanup ran.
Clear type PHP accepted.
Example
{ "type": "all"}Invalid_clear_type
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}Not authenticated. WordPress REST: rest_not_logged_in / rest_forbidden. Use cookie + X-WP-Nonce or Application Password.
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}Insufficient capability or invalid REST nonce. WordPress REST: rest_forbidden / rest_cookie_invalid_nonce.
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}