In some cases it might be necessary to delete all cores stored in ContentOnTarget. Please notice, that this operation cannot be reverted.

Request

The URL for deleting all Cores must not include any core identifier:

/api/2.2/[user]/[apiHash_User]/cores

The request answer corresponds to the operation state. Therefore, a http status of 200 means the successful deletion of all cores. Otherwise, a detailed error message is provided.

PHP Client Implementation

Example code for deleting all cores using the PHP client:

<?php
include_once("ContentOnTarget-PHP-API-Client.php");
$config = $config = com\repalogic\ContentOnTarget\Client\Configuration::getConfig("https://api.shopontarget.com/", "user", "userApiHash", "core name does not matter here", "core api hash does not matter here");

$coreApi = new com\repalogic\ContentOnTarget\Client\CoreApi($config);
$coreApi->clearCores();
?>