{"id":711,"date":"2017-04-21T15:32:12","date_gmt":"2017-04-21T15:32:12","guid":{"rendered":"http:\/\/live.ecd-demo.com\/apihelp\/?page_id=711"},"modified":"2025-07-21T17:41:02","modified_gmt":"2025-07-21T17:41:02","slug":"get-unique-values","status":"publish","type":"page","link":"https:\/\/apihelp.ecd-demo.com\/index.php\/documentation\/get-unique-values\/","title":{"rendered":"Get Unique Values"},"content":{"rendered":"<h3>Getting unique values of a property<\/h3>\n<p>This request returns the list of values of a specific asset attribute currently used. The response contains a list of values of the given attribute together with the number of matching assets.<\/p>\n<p>For these examples let&#8217;s use the source (station or channel or content provider) store.<\/p>\n<p>please refer to the <a href=\"\/index.php\/documentation\/list-of-stores\/source\/\">source schema<\/a> for complete list of properties<\/p>\n<hr \/>\n<p>To retrieve the <strong>ID<\/strong> of all source documents in the store we the <code>attribute<\/code> endpoint on the property <code>sourceId<\/code><\/p>\n<pre><code class=\"swift\">GET: https:\/\/&lt;base-url&gt;\/stores-active\/source\/attribute\/sourceId?api_key=&lt;api-key&gt;\n<\/code><\/pre>\n<p>This will get a response similar to below<\/p>\n<pre><code class=\"json\">{ \n    \"attribute\":\"sourceId\",\n    \"values\": [\n        {\"value\":\"689\",\"count\":1},\n        {\"value\":\"1198\",\"count\":1},\n        {\"value\":\"34675\",\"count\":1},\n        :\n        :\n    ]\n}\n<\/code><\/pre>\n<p>To retrieve the call-sign (call letters or textual identifier) of all the sources in the store, we use the <code>attribute<\/code> endpoint on the property <code>sourceName<\/code><\/p>\n<pre><code class=\"swift\">GET: https:\/\/&lt;base-url&gt;\/stores-active\/source\/attribute\/sourceName?api_key=&lt;api-key&gt;\n<\/code><\/pre>\n<p>This will get a response similar to below<\/p>\n<pre><code class=\"json\">{\n    \"attribute\":\"sourceName\",\n    \"values\":[\n        {\"value\":\"XEW-DT\",\"count\":1},\n        {\"value\":\"PIVOT\",\"count\":1},\n        {\"value\":\"HBOCOM\",\"count\":1},\n        :\n        :\n    ]\n}\n<\/code><\/pre>\n<blockquote><p>For more details go to the <a href=\"https:\/\/apihelp.ecd-demo.com\/index.php\/api-explorer\/\">API explorer<\/a><\/p><\/blockquote>\n<h3>Retrieve attribute values<\/h3>\n<h4>Retrieve all countries of origin in the catalog<\/h4>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentInstance\/event\/attribute\/countriesOfOrigin.countryId\n<\/code><\/pre>\n<h4>Retrieve all countries of origin of shows aired on channel HBO<\/h4>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentInstance\/event\/attribute\/countriesOfOrigin.countryId?filter={\"term\":\"source\",\"value\":\"HBO\"}\n<\/code><\/pre>\n<h4>Retrieve all sub-attributes of the tags attribute<\/h4>\n<pre><code class=\"swift\">GET https:\/\/&lt;base-url&gt;\/stores-active\/contentInstance\/event\/attribute\/tags\n<\/code><\/pre>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>Getting unique values of a property This request returns the list of values of a specific asset attribute currently used. The response contains a list of values of the given attribute together with the number of matching assets. For these examples let&#8217;s use the source (station or channel or content provider) store. please refer to [&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-711","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/711","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=711"}],"version-history":[{"count":4,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/711\/revisions"}],"predecessor-version":[{"id":1517,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/711\/revisions\/1517"}],"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=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}