ContentOnTarget supports you to update a core. 


The URL for updating a Core includes the coreName:


Using this URL, a cpre is updated by sending a PUT request with a JSON body:

      "coreName": "newCoreName",
      "apiHash": "newAPiHash-1",
      "coreSchema": "TestSchema"

Important: you can also update the underlying schema. However, this deletes all documents within the core. You have to reindex them as the document structure has changed.

Possible Fields

The fields are identical to the POST request.

Request Answer

The request answer corresponds to the operation state. Therefore, a http status of 200 (OK) means the successful storage of the schema. Otherwise, a detailed error message is provided.

PHP Client Implementation

The PHP Client API provides full functionality to update schemas in ContentOnTarget.

$config = $config = com\repalogic\ContentOnTarget\Client\Configuration::getConfig("", "user", "userApiHash", "core name does not matter here", "core api hash does not matter here");

$coreApi = new com\repalogic\ContentOnTarget\Client\CoreApi($config);
$core = $coreApi->getCore("myCore1");
$result = $coreApi->updateCore($core);