<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic List all possible dc:subjects values in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/list-all-possible-dc-subjects-values/m-p/319427#M6428</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I am trying to retrieve all possible values for subjects trough REST API (even if the subject is not used in any document)&lt;/P&gt;
&lt;P&gt;Here is the POST request that I am sending to URL&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/nuxeo/site/automation/Document.Query" target="test_blank"&gt;http://localhost:8080/nuxeo/site/automation/Document.Query&lt;/A&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;HTTP headers:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;
X-NXDocumentProperties	* 
Accept: application/json+nxentity 
Content-type: application/json+nxrequest; charset=UTF-8 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;POST body to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;
{"params":{"query":"SELECT DISTINCT dc:subjects/*1 FROM Document "},"context":{}} 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem is that I am receiving an empty result like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;
{"entity-type":"documents","entries":[]} 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What I am doing wrong? (I do have some documents with assigned subjects).
I guess even if I manage to run the query, it will return the assigned subjects (to any of the documents).&lt;/P&gt;
&lt;P&gt;How can I return all the subjects, even if they are not assigned?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2013 17:07:16 GMT</pubDate>
    <dc:creator>thexman_</dc:creator>
    <dc:date>2013-03-20T17:07:16Z</dc:date>
    <item>
      <title>List all possible dc:subjects values</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/list-all-possible-dc-subjects-values/m-p/319427#M6428</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I am trying to retrieve all possible values for subjects trough REST API (even if the subject is not used in any document)&lt;/P&gt;
&lt;P&gt;Here is the POST request that I am sending to URL&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/nuxeo/site/automation/Document.Query" target="test_blank"&gt;http://localhost:8080/nuxeo/site/automation/Document.Query&lt;/A&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;HTTP headers:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;
X-NXDocumentProperties	* 
Accept: application/json+nxentity 
Content-type: application/json+nxrequest; charset=UTF-8 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;POST body to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;
{"params":{"query":"SELECT DISTINCT dc:subjects/*1 FROM Document "},"context":{}} 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem is that I am receiving an empty result like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;
{"entity-type":"documents","entries":[]} 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What I am doing wrong? (I do have some documents with assigned subjects).
I guess even if I manage to run the query, it will return the assigned subjects (to any of the documents).&lt;/P&gt;
&lt;P&gt;How can I return all the subjects, even if they are not assigned?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2013 17:07:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/list-all-possible-dc-subjects-values/m-p/319427#M6428</guid>
      <dc:creator>thexman_</dc:creator>
      <dc:date>2013-03-20T17:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: List all possible dc:subjects values</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/list-all-possible-dc-subjects-values/m-p/319428#M6429</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;To retrieve all the possible subjects values, you need to use the &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.6-RC1/viewOperation/Directory.Entries"&gt;Directory.Entries&lt;/A&gt; operation:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/nuxeo/site/automation/Directory.Entries" target="test_blank"&gt;http://localhost:8080/nuxeo/site/automation/Directory.Entries&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;POST body to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;{"params":{"directoryName":"topic"}}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will return a JSON array like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;[ { "id" : "art",
    "label" : "label.directories.topic.art",
    "obsolete" : 0,
    "ordering" : 10000000
  },
  { "id" : "human sciences",
    "label" : "label.directories.topic.humanscience",
    "obsolete" : 0,
    "ordering" : 10000000
  },
  { "id" : "society",
    "label" : "label.directories.topic.society",
    "obsolete" : 0,
    "ordering" : 10000000
  },
  { "id" : "daily life",
    "label" : "label.directories.topic.dailylife",
    "obsolete" : 0,
    "ordering" : 10000000
  },
  { "id" : "technology",
    "label" : "label.directories.topic.technology",
    "obsolete" : 0,
    "ordering" : 10000000
  }
]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This returns the first level topics. Change the directoryName to &lt;STRONG&gt;subtopic&lt;/STRONG&gt; to get all the level2 topics.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2013 12:11:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/list-all-possible-dc-subjects-values/m-p/319428#M6429</guid>
      <dc:creator>Laurent_Doguin</dc:creator>
      <dc:date>2013-03-22T12:11:12Z</dc:date>
    </item>
  </channel>
</rss>

