Media Deduper Pro REST Endpoints

Media Deduper Pro exposes REST API endpoints for interacting with the indexer process. These can be used to automate the indexing process using shell scripts or cron jobs on your server. 

Accepted request methods and full URLs are given below as examples; replace "yoursite.com" with your actual domain.

POST https://yoursite.com/wp-json/mdd_pro/v2/index/

If the indexer isn't already running, this will start the indexer.

Append ?clean=true to the request URL to wipe the current index data and reindex all content on your site.

Response HTTP status code will always be 200.

GET https://yoursite.com/wp-json/mdd_pro/v2/index_status/

Retrieve data about the indexer status. Response will be a JSON object with the following structure:

{

    "processed": 1, // The number of posts and attachments that have been indexed during this indexer run (i.e. since the indexer last started).

    "failed": 0, // The number of posts and attachments that have failed to index during this indexer run.

    "total": 10, // The number of posts and attachments in the indexer queue for this run.

    "error_messages": [], // Array of error messages related to any posts or attachments that failed to index.

    "state": "processing" // Either 'processing', 'complete', or 'stopped' ('stopped' indicates that the last run was cancelled).

}

Response HTTP status code will always be 200.

POST https://yoursite.com/wp-json/mdd_pro/v2/index_stop/

Stop the indexer, if it's currently running, and return its status. Response data structure will match that of the /index_status/ endpoint, as described above.

Response HTTP status code will always be 200.




Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.