{"id":801,"date":"2017-08-16T20:16:45","date_gmt":"2017-08-16T20:16:45","guid":{"rendered":"http:\/\/live.ecd-demo.com\/apihelp\/?page_id=801"},"modified":"2025-07-21T17:18:22","modified_gmt":"2025-07-21T17:18:22","slug":"annotations","status":"publish","type":"page","link":"https:\/\/apihelp.ecd-demo.com\/index.php\/documentation\/requests\/annotations\/","title":{"rendered":"Annotations"},"content":{"rendered":"<h3>ABOUT ANNOTATIONS<\/h3>\n<hr>\n<p>Annotations define which document attributes retrieve by filter and search requests shall return to a client. Annotations may be pre-configured in CDAPI or provided ad-hoc in the request. The annotation feature supports unconditional attributes which are always returned as well as conditional attributes, which are only returned if the condition is met. In case of list attributes, the condition is evaluated separately for each list element.<\/p>\n<h4>ALL ANNOTATIONS<\/h4>\n<pre><code class=\"swift\">GET  http:\/\/&lt;api-domain&gt;\/annotations?count=5&amp;startAfter=0\n<\/code><\/pre>\n<h5>Parameters:<\/h5>\n<p><strong><code>count<\/code><\/strong>: <em>(optional)<\/em> Number of annotation templates to return, used together with startAfter for pagination of the response.<br \/>\n<strong><code>startAfter<\/code><\/strong>: <em>(optional)<\/em> ID of the last annotation template of the previous page. Note that annotation templates are stored in a random but deterministic order.<\/p>\n<h5>RESPONSE:<\/h5>\n<pre><code class=\"json\">[\n    {\n        \"annotationId\": \"banner_annotation\",\n        \"unconditionalAttributes\": [\n            \"internalIds\",\n            \"tags\",\n            \"searchableTitles\",\n            \"images\",\n            \"scheduledStartDateTime\",\n            \"scheduledEndDateTime\",\n            \"scheduledDuration\",\n            \"seasonNumber\",\n            \"episodeNumber\",\n            \"episodeAiringSequenceNumber\",\n            \"sourceId\",\n            \"yearOfProduction\",\n            \"releaseDates\"\n        ],\n        \"conditionalAttributes\": [\n            {\n                \"condition\": {\n                    \"term\": \"images.width\",\n                    \"value\": \"1920\",\n                    \"operator\": \"atLeast\"\n                },\n                \"attributes\": [\n                    \"images\"\n                ]\n            }\n        ]\n    }\n]\n<\/code><\/pre>\n<hr>\n<h3>ANNOTATION TEMPLATES<\/h3>\n<h4>GET<\/h4>\n<p>Retrieves an annotation template which can be used by filter and search request to define which document attributes the API has to return.<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-domain&gt;\/annotations\/&lt;annotationId&gt;\n<\/code><\/pre>\n<h5>RESPONSE:<\/h5>\n<pre><code class=\"json\">{\n    \"annotationId\": \"banner_annotation\",\n    \"unconditionalAttributes\": [\n        \"internalIds\",\n        \"tags\",\n        \"searchableTitles\",\n        \"images\",\n        \"scheduledStartDateTime\",\n        \"scheduledEndDateTime\",\n        \"scheduledDuration\",\n        \"seasonNumber\",\n        \"episodeNumber\",\n        \"episodeAiringSequenceNumber\",\n        \"sourceId\",\n        \"yearOfProduction\",\n        \"releaseDates\"\n    ],\n    \"conditionalAttributes\": [\n        {\n            \"condition\": {\n                \"term\": \"images.width\",\n                \"value\": \"1920\",\n                \"operator\": \"atLeast\"\n            },\n            \"attributes\": [\n                \"images\"\n            ]\n        }\n    ]\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ABOUT ANNOTATIONS Annotations define which document attributes retrieve by filter and search requests shall return to a client. Annotations may be pre-configured in CDAPI or provided ad-hoc in the request. The annotation feature supports unconditional attributes which are always returned as well as conditional attributes, which are only returned if the condition is met. In [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":936,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-801","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/801","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/comments?post=801"}],"version-history":[{"count":2,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/801\/revisions"}],"predecessor-version":[{"id":1492,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/801\/revisions\/1492"}],"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=801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}