Annotations
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 case of list attributes, the condition is evaluated separately for each list element.
ALL ANNOTATIONS
GET http://<api-domain>/annotations?count=5&startAfter=0
Parameters:
count: (optional) Number of annotation templates to return, used together with startAfter for pagination of the response.
startAfter: (optional) ID of the last annotation template of the previous page. Note that annotation templates are stored in a random but deterministic order.
RESPONSE:
[
{
"annotationId": "banner_annotation",
"unconditionalAttributes": [
"internalIds",
"tags",
"searchableTitles",
"images",
"scheduledStartDateTime",
"scheduledEndDateTime",
"scheduledDuration",
"seasonNumber",
"episodeNumber",
"episodeAiringSequenceNumber",
"sourceId",
"yearOfProduction",
"releaseDates"
],
"conditionalAttributes": [
{
"condition": {
"term": "images.width",
"value": "1920",
"operator": "atLeast"
},
"attributes": [
"images"
]
}
]
}
]
ANNOTATION TEMPLATES
GET
Retrieves an annotation template which can be used by filter and search request to define which document attributes the API has to return.
GET http://<api-domain>/annotations/<annotationId>
RESPONSE:
{
"annotationId": "banner_annotation",
"unconditionalAttributes": [
"internalIds",
"tags",
"searchableTitles",
"images",
"scheduledStartDateTime",
"scheduledEndDateTime",
"scheduledDuration",
"seasonNumber",
"episodeNumber",
"episodeAiringSequenceNumber",
"sourceId",
"yearOfProduction",
"releaseDates"
],
"conditionalAttributes": [
{
"condition": {
"term": "images.width",
"value": "1920",
"operator": "atLeast"
},
"attributes": [
"images"
]
}
]
}