Navigate The Tag Hierarchy
The Content Engine's tag hierarchy, unlike all other content is not accessible from the main web service start URL. It has its own start URL, and in some senses can therefore be regarded as a separate web service. To access the tag hierarchy, a client program must submit a request to the following start URL:
curl -u user:password -X GET http://host-ip-address/webservice/escenic/classification
which returns an Atom feed like this:
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0"> <id>http://host-ip-address/webservice/escenic/classification</id> <title type="text">The entry point for the Escenic Classification Web Service</title> <link href="http://host-ip-address/webservice/escenic/classification" rel="self"/> <link href="http://host-ip-address/webservice/open-search/tag-search-description.xml" rel="search"/> <author> <name>Escenic Classification Web Service</name> </author> <updated>2011-03-11T05:57:18.540Z</updated> ... <entry> <id>tag:folksonomy.escenic.com,2002</id> <title type="text">Tags</title> <updated>2011-03-11T05:57:18.540Z</updated> <content type="application/vnd.vizrt.payload+xml"> <vdf:payload model="http://host-ip-address/webservice/escenic/classification/model/tag" xmlns:vdf="http://www.vizrt.com/types"> <vdf:field name="description"> <vdf:value>A folksonomy for all types of tags</vdf:value> </vdf:field> <vdf:field name="aliases"> <vdf:list> <vdf:value>AP</vdf:value> </vdf:list> </vdf:field> </vdf:payload> </content> <link href="http://host-ip-address/webservice/escenic/classification/tag:folksonomy.escenic.com,2002" rel="self" title="Tags"/> <link href="http://host-ip-address/webservice/escenic/classification/tag:folksonomy.escenic.com,2002" rel="down" title="Tags" thr:count="35"/> </entry> ... </feed>
This feed contains an entry for each tag structure defined at the site.
Each entry contains a single down
link that returns a
new feed containing entries for each top-level tag in the structure. So
submitting the request:
curl -u user:password -X GET http://host-ip-address/webservice/escenic/classification/tag:folksonomy.escenic.com,2002
returns a new Atom feed containing the top-level content of this tag structure.
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0"> <id>http://host-ip-address/webservice/escenic/classification/tag:folksonomy.escenic.com,2002</id> <title type="text">Tags</title> <link href="http://host-ip-address/webservice/escenic/classification/tag:folksonomy.escenic.com,2002" rel="self"/> <author> <name>Escenic Classification Web Service</name> </author> <updated>2011-03-14T11:16:00.687Z</updated> <link href="http://host-ip-address/webservice/escenic/changelog/classification/tag:folksonomy@escenic.com,2002" rel="http://www.vizrt.com/types/relation/changelog"/> <opensearch:Url template="http://host-ip-address/webservice/escenic/classification/tag/search?searchTerms={searchTerms}&parent=tag%3Afolksonomy%40escenic.com%2C2002" type="application/atom+xml" rel="parent"/> <entry> <id>tag:folksonomy.escenic.com,2002:db:1346</id> <title type="text">politics</title> <updated>2011-03-14T11:16:00.687Z</updated> ... <link href="http://host-ip-address/webservice/escenic/classification/tag/children/tag:folksonomy.escenic.com,2002:db:1346" rel="down" title="politics" thr:count="10"/> ... </entry> </feed>
A client can therefore use these links to traverse the entire tag
hierarchy of a publication. Following the down
link
in the above example will return a feed containing another 10 entries
representing the politics
tag's children.
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0"> ... <entry> <id>tag:folksonomy.escenic.com,2002:ap</id> <title type="text">Arbeiderpartiet</title> <updated>2011-03-14T11:16:00.687Z</updated> <link href="http://host-ip-address/webservice/escenic/classification/tag/tag:folksonomy.escenic.com,2002,2011:ap" rel="self" title="Arbeiderpartiet"/> <link href="http://host-ip-address/webservice/escenic/classification/tag/tag:folksonomy.escenic.com,2002:db:1346" rel="http://www.vizrt.com/types/relation/parent" title="politics"/> <link href="http://host-ip-address/webservice/escenic/classification/tag:folksonomy.escenic.com,2002" rel="http://www.vizrt.com/types/relation/top" title="Tags"/> <link href="http://host-ip-address/webservice/escenic/classification/tag/children/tag:folksonomy.escenic.com,2002:ap" rel="down" title="Arbeiderpartiet" thr:count="25"/> <opensearch:Url template="http:/host-ip-address/webservice/search/{sectionPath}/{searchTerms}/?pw={startPage?}&c={count?}&tag=tag%3Afolksonomy.escenic.com%2C2002%3Aap" type="application/atom+xml"/> </entry> ... </feed>
Each tag entry contains an OpenSearch Url
element.
This element contains a search template that can be used to find content
items tagged with this tag. See
Searching for instructions on how to use
search templates.
Tag entries may also contain the following navigation links:
http://www.vizrt.com/types/relation/parent
-
Returns a feed containing an entry representing this tag's parent tag. Top level tag entries do not contain a link of this type.
http://www.vizrt.com/types/relation/top
-
Returns a feed containing an entry representing the tag structure to which this tag belongs.