Delete document
HTTP verb | URL | Request parameters |
---|---|---|
DELETE | /cmod-rest/v1/hits/{folderName} | Content Manager OnDemand folder name JSON request payload |
The delete document API takes a URL encoded folder name and a JSON request payload specifying the documents that should be deleted from Content Manager OnDemand. The documents being deleted must all belong to the same Content Manager OnDemand folder.
The request payload consists of the following parameters formatted as JSON. See the Sample request following the table for an example.
Parameter name | Type | Description |
---|---|---|
docIDs | array | Array of document identifier strings. |
docID | string | Content Manager OnDemand document identifier. These strings should not be encoded. |
Sample request
DELETE /cmod-rest/v1/hits/Ledger%20Reports HTTP/1.1
usi-date: 2023-11-13T18:32:33Z
Authorization: CMODSharedKey odvttstl01-68yXERhn79KNry/oV7IY:jL/WsO4srBxy1j+iTQORwZ2weZRvC34OAxlVn+EBLyA=
Content-Type: application/json
Host: localhost
Content-Length: 221
{
"docIDs" : [ {
"docID" : "Y2E0qigprXL1aWyjirMpuOzk99DPaWEdNmkjp5ptgAqHWYIcbNPdxRcSG5n4q9HFrPiHqOneDJNtf9ZZAJDO4GROAVEquPFcqA8oTIRI/lcHE3cDjxCb6CL1xzGzaIMI78+QJDUmveAxMGH61SZ3431L4tr3KwIVylNZTBqqRQWV4="
} ]
}
The response from the delete document API provides the success or failed status for each document as well as a total number of failed and succeeded deletions.
Sample response
HTTP/1.1 200 OK
X-Powered-By: Servlet/4.0
X-Content-Type-Options: nosniff
Content-Type: application/json
Date: Mon, 13 Nov 2023 18:32:34 GMT
Correlation-Id: 20cfab5f-cdff-4105-a057-2bad51938669
Content-Language: en-US
Content-Length: 289
{
"docIDs" : [ {
"docID" : "Y2E0qigprXL1aWyjirMpuOzk99DPaWEdNmkjp5ptgAqHWYIcbNPdxRcSG5n4q9HFrPiHqOneDJNtf9ZZAJDO4GROAVEquPFcqA8oTIRI/lcHE3cDjxCb6CL1xzGzaIMI78+QJDUmveAxMGH61SZ3431L4tr3KwIVylNZTBqqRQWV4=",
"status" : "Success"
} ],
"failed" : "0",
"succeeded" : "1"
}