{"id":1120,"date":"2019-10-17T16:42:07","date_gmt":"2019-10-17T16:42:07","guid":{"rendered":"http:\/\/live.ecd-demo.com\/apihelp\/?page_id=1120"},"modified":"2025-01-30T15:28:24","modified_gmt":"2025-01-30T15:28:24","slug":"deleted-documents","status":"publish","type":"page","link":"https:\/\/apihelp.ecd-demo.com\/index.php\/documentation\/requests\/deleted-documents\/","title":{"rendered":"Deleted Documents"},"content":{"rendered":"\nThe <em>deleted-documents<\/em> resource can be used to obtain a list of all the documents that have been deleted from the API since a specified time. A typical use case would be where a client wishes to maintain an up-to-date view of the events on a linear channel&#8217;s schedule, and therefore needs to know which events have been recently removed from that schedule.\n\n\n\n\n<h3 class=\"wp-block-heading\">The Request<\/h3>\n\n\n\n\nThe core syntax for a deleted-documents request is as follows:\n\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/{{ApiEndpoint}}\/deleted-documents?deletedSince={{DeletionDate}}&amp;api_key={{ApiKey}}<\/pre>\n\n\n\n\nHere, DeletionDate should be a date\/time in ISO 8601 format, e.g. 2019-10-17T00:00:00.\n\n\n\nThis will return a list of all the documents that have been deleted from all <a href=\"\/index.php\/documentation\/what-does-the-api-contain\/api-stores\/\">stores<\/a>, irrespective of type. Adding the following parameter will filter the results to list only the documents deleted from a specific store since the DeletionDate:\n\n\n\n\n<pre class=\"wp-block-preformatted\">&amp;storeType={{StoreType}}<\/pre>\n\n\n\n\nwhere StoreType can be any of contentinstance, contributor or source.\n\n\n\nIf StoreType is <em>contentinstance<\/em>, adding the following parameter will filter the results to list only the contentinstance documents of a specific type deleted since the DeletionDate:\n\n\n\n\n<pre class=\"wp-block-preformatted\">&amp;hierarchyLevel={{HierarchyLevel}}<\/pre>\n\n\n\n\nwhere HierarchyLevel can be any of series, season, multiPartProgram, programVariation or event.\n\n\n\n\n<h3 class=\"wp-block-heading\">The Response<\/h3>\n\n\n\n\nThe response is an array of JSON objects with the following schema:\n\n\n\n\n<pre class=\"wp-block-preformatted\">    {\n        \"documentId\": \"847504563\",\n        \"deleteDateTime\": \"2019-10-17T04:00:15.0Z\",\n        \"storeType\": \"contentinstance\",\n        \"hierarchyLevel\": \"event\",\n        \"storeId\": \"standardericisson\"\n    },<\/pre>\n\n\n\n\nHere the documentId value will be the primary ID of whatever type of document was deleted. So if a contentinstance\/event document was deleted, the documentId will contain the internalIds.eventId of the deleted document.\n\n\n\nNote that:\n\n\n\n\n<ul class=\"wp-block-list\"><li>This resource does not return a paged list of results, and<\/li><li>If an API includes linear channel metadata, the documents for all events that aired in the recent past will be routinely deleted from the API, and<\/li><li>This means that responses from this resource can get very big.<\/li><\/ul>\n\n","protected":false},"excerpt":{"rendered":"<p>The deleted-documents resource can be used to obtain a list of all the documents that have been deleted from the API since a specified time. A typical use case would be where a client wishes to maintain an up-to-date view of the events on a linear channel&#8217;s schedule, and therefore needs to know which events [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":936,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1120","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/1120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/comments?post=1120"}],"version-history":[{"count":2,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/1120\/revisions"}],"predecessor-version":[{"id":1437,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/1120\/revisions\/1437"}],"up":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/936"}],"wp:attachment":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/media?parent=1120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}