{"id":28,"date":"2017-02-14T18:45:12","date_gmt":"2017-02-14T18:45:12","guid":{"rendered":"http:\/\/live.ecd-demo.com\/apihelp\/?page_id=28"},"modified":"2025-07-21T16:34:40","modified_gmt":"2025-07-21T16:34:40","slug":"getting-started","status":"publish","type":"page","link":"https:\/\/apihelp.ecd-demo.com\/index.php\/documentation\/getting-started\/","title":{"rendered":"Getting Started"},"content":{"rendered":"<h3>SCOPE<\/h3>\n<p>Simply.TV Content Discovery API (CDAPI) is designed in the REST (Representational State Transfer) architectural style, using HTTP as the underlying protocol. Metadata are presented in the form of JSON documents. Documents are organized into stores by Tenant, Store Type (e.g. content, contributors, sources), Hierarchy Level, and Store ID.<\/p>\n<p>For the purpose of this website and the examples presented on this site, the ECDAPI instance we are working off of here will be those below, depending on the region. The instance (tenant) that you&#8217;ll be using in production environment will be different.<\/p>\n<blockquote><p><strong>North America:<\/strong> http:\/\/fyi.uat.ecdapi.net<\/p>\n<p><strong>Europe:<\/strong> http:\/\/rbmdemo.ecdapi.net<\/p><\/blockquote>\n<h3>API DATA<\/h3>\n<ul>\n<li>Rich program metadata for linear and non-linear video content as well as person \/ actor information, ratings, awards\u2026<\/li>\n<li>Links to images, video on demand (VoD) \/ catch-up TV catalogues, Movie Trailers, 3rd party sites.<\/li>\n<\/ul>\n<h3>API FUNCTIONS<\/h3>\n<ul>\n<li>Comprehensive EPG tool set allowing complex filtering, sorting and grouping by any attribute(s) [Pagination].<\/li>\n<li>Configurable weighted Search and search phrase completion [Faceted search].<\/li>\n<li>Personalized functions for managing user data such as favorite channels, reminders, playlists and more.<\/li>\n<li>Optional: Push notifications to mobile devices.<\/li>\n<li>Optional: Advanced recommendation (similarity, preference, collaborative, statistical, social and editorial engines).<\/li>\n<\/ul>\n<h3>GETTING STARTED<\/h3>\n<p>ECDAPI is restful and uses standard internet technologies such as HTTP(S), and JSON to allow access from web applications and\/or from any internet-connected device (set-top boxes, smart TVs, tablets, smartphones, wearables etc.).<\/p>\n<p>The API is document based and currently supports the following document types:<\/p>\n<ul>\n<li><strong><code>source:<\/code><\/strong> information about channels and or VoD \/ catch-up sources.<\/li>\n<li><strong><code>contentInstance:<\/code><\/strong> hierarchical information about the program data:\n<ul>\n<li><code>series:<\/code> information about series (grouping seasons and programs).<\/li>\n<li><code>season:<\/code> information about seasons (grouping programs).<\/li>\n<li><code>program:<\/code> information about programs independent of airing.<\/li>\n<li><code>event:<\/code> information about one airing of a programme (or one availability period for non-linear content).<\/li>\n<\/ul>\n<\/li>\n<li><strong><code>contributor:<\/code><\/strong> information about people, for instance actors, presenters or directors.<\/li>\n<li><strong><code>annotations:<\/code><\/strong> templates for which document attributes filter and search requests shall return to a client.<\/li>\n<li><strong><code>entitlements:<\/code><\/strong> templates with additional filtering criteria defining which content can be retrieved.<\/li>\n<\/ul>\n<h3>MAKING YOUR FIRST REQUEST<\/h3>\n<p>Most requests to the API are built up as follows:<\/p>\n<pre><code class=\"swift\">http(s):\/\/&lt;api-url&gt;\/&lt;store&gt;\/&lt;document-type&gt;\/&lt;function&gt;?&lt;parameter(s)&gt;\n<\/code><\/pre>\n<p>Example: search for \u201chouse\u201d in all event documents on the API sandbox instance ( here being ** &#8220;sandbox.ecdapi.net&#8221;**):<\/p>\n<pre><code class=\"swift\">GET http:\/\/sandbox.ecdapi.net\/stores-active\/contentInstance\/event\/search?query=house\n<\/code><\/pre>\n<p>You should also attach a Content-Type header and any authentication required by the instance you are working with.<\/p>\n<pre><code class=\"http\">Content-Type: application\/json\n<\/code><\/pre>\n<p>API keys should be attached either as request parameters in the URL:\u00a0<code>?api_key={xxyyzz}<\/code><\/p>\n<p>Useful headers that you may want to attach are:<\/p>\n<ul>\n<li><code>Accept-encoding: gzip:<\/code> API to return a compressed HTTP response<\/li>\n<li><code>content-encoding:gzip<\/code> API will use this to compress the media-type.<\/li>\n<li><code>Access-Control-Allow-Origin:<\/code> for dealing with cross site scripting issues.<\/li>\n<\/ul>\n<p>The API will also return useful caching headers: <code>Expires: Tue, 08 Feb 2019 09:44:05 GMT<\/code><\/p>\n<p>A selection of requests to support common use cases can be found\u00a0<a href=\"\/index.php\/documentation\/requests\/common-api-requests\/\">here<\/a>.<\/p>\n<h3>THE API FUNCTIONS<\/h3>\n<ul>\n<li><code>filter:<\/code> strict filters for selecting a subsection of the documents, for instance \u201call events for channel X of genre Y\u201d.<\/li>\n<li><code>search:<\/code> documents are scored based on how well they match the search criteria, for instance search for (part of) a title.<\/li>\n<li><code>search_phrase:<\/code> search for terms completing the query and return in which fields they were found, for instance suggest completions for \u201cfish\u201d.<\/li>\n<li><code>attribute:<\/code> faceted search, for instance count the number of countries in the document set.<\/li>\n<\/ul>\n<h3>CONSTRUCTING A FILTER<\/h3>\n<p>A filter is constructed as follows:<\/p>\n<pre><code class=\"json\">{\n    \"term\": string,\n    \"operator\": enum,\n    \"value\": string\n}\n<\/code><\/pre>\n<ul>\n<li><code>term<\/code> defines the document attribute in dot notation<\/li>\n<li><code>operator<\/code> is one of \u201c<code>equals<\/code>\u201d, \u201c<code>notEquals<\/code>\u201d, \u201c<code>atMost<\/code>\u201d, \u201c<code>atLeast<\/code>\u201d, \u201c<code>smaller<\/code>\u201d, \u201c<code>larger<\/code>\u201d, \u201c<code>exists<\/code>\u201d or \u201c<code>notExists<\/code>\u201d, the default value is \u201c<code>equals<\/code>\u201d<\/li>\n<li><code>value<\/code> the value of the document attribute<\/li>\n<\/ul>\n<p>Example: Get all events of a series by ID<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-url&gt;\/stores-active\/contentInstance\/event\/filter?filter={\"term\":\"internalIds.seriesId\",\"value\":\"105739158\"}\n<\/code><\/pre>\n<p>There is a special case for the operator \u201c<code>in<\/code>\u201d where the filter expects a list of <code>\u201cvalues\u201d:[string]<\/code> that the attribute specified by term has to match.<\/p>\n<p>Example: Get events on channels ITV2 and ITV3<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-url&gt;\/stores-active\/contentInstance\/event\/filter?filter={\"term\":\"source\",\"operator\":\"in\",\"values\":[\"ITV2\",\"ITV3\"]}\n<\/code><\/pre>\n<p>You can combine filters using operator \u201c<code>and<\/code>\u201d, \u201c<code>or<\/code>\u201d or \u201c<code>nestedAnd<\/code>\u201d:<\/p>\n<pre><code class=\"json\">{\n    \"operator\": enum ,\n    \"criteria\": [@genericFilter]\n}\n<\/code><\/pre>\n<p>Example: Get events that have keyword of value talkshow<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-url&gt;\/stores-active\/contentInstance\/event\/filter?filter={\"operator\":\"nestedAnd\",\"criteria\":[{\"term\":\"tags.category.categoryId\",\"value\":\"Keyword\"},{\"term\":\"tags.value.valueId\",\"value\":\"talkshow\"}]}\n<\/code><\/pre>\n<h3><code>For more information, visit our <a href=\"\/index.php\/documentation\/what-does-the-api-contain\/filters\/\">Filters<\/a> page<\/code><\/h3>\n<h3>SEARCH<\/h3>\n<p>ECDAPI\u2019s search feature offers intelligent free text search capabilities among the documents in the stores. Results are scored by relevance. In addition to simple search (single word or phrase used as query), structured search based on Lucene syntax is supported.<\/p>\n<h4>Simple Search for a keyword<\/h4>\n<p>Example: Search all searchable text fields for \u201cdevon\u201d in all event documents<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-url&gt;\/stores-active\/contentInstance\/event\/search?query=devon\n<\/code><\/pre>\n<h3>Limiting search to certain fields<\/h3>\n<p>Example: Search for \u201cterminator\u201d in searchableTitles in all event documents<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-url&gt;\/stores-active\/contentInstance\/event\/search?query=terminator&amp;attributes=[\"searchableTitles.*\"]\n<\/code><\/pre>\n<h4>Search for contributors<\/h4>\n<p>Example: search for &#8220;spacey&#8221; in the contributor documents<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-url&gt;\/stores-active\/contributor\/search?query=spacey\n<\/code><\/pre>\n<h3>COMBINING SEARCH AND FILTERING<\/h3>\n<p>Search and filtering can be combined in order to limit the scope of the search to a subset of the available program data:<\/p>\n<p>Example: search for \u201cgirls\u201d in VoD events only<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-url&gt;\/stores-active\/contentInstance\/event\/search?query=girls&amp;filter={\"term\":\"eventType\",\"value\":\"vod\"}\n<\/code><\/pre>\n<h3>SEARCH PHRASE COMPLETION<\/h3>\n<p>Retrieves search phrase options matching a partial query. Returns the complete string along with the name of the attribute where it was found. This is typically presented while the query is being typed providing an autocomplete feature.<\/p>\n<p>Example: get search phrase suggestions for all supported fields for \u201cgir\u201d<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-url&gt;\/stores-active\/contentInstance\/event\/search-phrase\/gir\n<\/code><\/pre>\n<h4>Limiting search phrase completion to certain fields<\/h4>\n<p>Example: Search for \u201cgir\u201d in searchableTitles and searchableTextItems in all event documents<\/p>\n<pre><code class=\"swift\">GET http:\/\/&lt;api-url&gt;\/stores-active\/contentInstance\/event\/search-phrase\/gir?attributes=[\"searchableTitles.*\",\"searchableTextItems.*\"]\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SCOPE Simply.TV Content Discovery API (CDAPI) is designed in the REST (Representational State Transfer) architectural style, using HTTP as the underlying protocol. Metadata are presented in the form of JSON documents. Documents are organized into stores by Tenant, Store Type (e.g. content, contributors, sources), Hierarchy Level, and Store ID. For the purpose of this website [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":279,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-28","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/28","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=28"}],"version-history":[{"count":2,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/28\/revisions"}],"predecessor-version":[{"id":1484,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/28\/revisions\/1484"}],"up":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/279"}],"wp:attachment":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/media?parent=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}