Navigate The Section Hierarchy
A client application can navigate the section hierarchy by recursively
following all links with the rel
attribute
down
(see down).
Root section 1 in the "start" Atom feed shown in
Get Started, for example, has a single
down
link that returns a new feed containing entries
for all of section 1's subsections. So submitting the request:
curl -u user:password -X GET http://host-ip-address/webservice/escenic/section/1/subsections
returns a new Atom feed like this:
<feed xmlns="http://www.w3.org/2005/Atom"> <author> <name>Escenic Content Engine</name> </author> <id>http://host-ip-address/webservice/escenic/section/1/subsections</id> <link rel="self" href="http://host-ip-address/webservice/escenic/section/1/subsections" type="application/atom+xml"/> <updated>2010-06-23T17:35:45.180Z</updated> <title type="text">Subsections for Section with id=1</title> <entry> <id>http://host-ip-address/webservice/escenic/section/22</id> <link rel="self" href="http://host-ip-address/webservice/escenic/section/22" type="application/atom+xml; type=entry"/> <link rel="edit" href="http://host-ip-address/webservice/escenic/section/22" type="application/atom+xml; type=entry"/> <link rel="http://www.vizrt.com/types/relation/lock" href="http://host-ip-address/webservice/escenic/lock/section/22" type="application/atom+xml; type=entry"/> <dcterms:identifier>22</dcterms:identifier> <link href="http://host-ip-address/webservice/escenic/publication/publication-id/" rel="http://www.vizrt.com/types/relation/publication" type="application/atom+xml; type=entry" title="publication-title"/> <metadata:publication href="http://host-ip-address/webservice/escenic/publication/publication-id/" title="publication-title"/> <content type="application/vnd.vizrt.payload+xml"> ...[section content omitted here]... </content> <title type="text">Escenic Times</title> <summary type="text">Escenic Times</summary> <app:edited>2012-08-06T14:03:30.527Z</app:edited> <link href="http://host-ip-address:8140/publication-id/" rel="alternate"/> <updated>2012-08-06T14:03:30.527Z</updated> <published>2007-08-31T05:47:44.797Z</published> <dcterms:created>2007-08-31T05:47:44.797Z</dcterms:created> <category term="directory" scheme="http://www.vizrt.com/types"/> <link xmlns:thr="http://purl.org/syndication/thread/1.0" rel="down" href="http://host-ip-address/webservice/escenic/section/22/subsections" type="application/atom+xml" thr:count="3"/> <link rel="http://www.vizrt.com/types/relation/inboxes" href="http://host-ip-address/webservice/escenic/section/22/inboxes" type="application/atom+xml"/> <link rel="http://www.vizrt.com/types/relation/lists" href="http://host-ip-address/webservice/escenic/section/22/lists" type="application/atom+xml"/> <link rel="http://www.vizrt.com/types/relation/pages" href="http://host-ip-address/webservice/escenic/section/22/pages" type="application/atom+xml"/> <link rel="http://www.vizrt.com/types/relation/content-items" href="http://host-ip-address/webservice/escenic/section/22/content-items" type="application/atom+xml"/> <link rel="http://www.vizrt.com/types/relation/changelog" href="http://host-ip-address/webservice/escenic/changelog/section/22" type="application/atom+xml"/> <link rel="http://www.vizrt.com/types/relation/active-page" href="http://host-ip-address/webservice/content/com.escenic.index-page/1362" type="application/vnd.escenic.content+xml; type=com.escenic.index-page" title="Daily News"/> <metadata:home-section>false</metadata:home-section> </entry> ...[other entry elements omitted here]... </feed>
All the entries in this feed will contain a similar
down
link (highlighted in the above example) leading
to further subsections that the client can follow. If a section has no
subsections, then following the link will result in an empty feed like
this:
<feed> <author> <name>Escenic Content Engine</name> </author> <id>http://host-ip-address/webservice/escenic/section/4161/subsections</id> <link rel="self" href="http://host-ip-address/webservice/escenic/section/4161/subsections" type="application/atom+xml"/> <updated>2012-09-11T12:37:38.172Z</updated> <title type="text">Subsections for Section with id=4161</title> <link href="http://host-ip-address/webservice/escenic/section/22/subsections"/> </feed>
A client can therefore use these links to traverse the entire section tree of a publication.