The switches can be applied in any order as part of a simple query-string:
- children :
http://www.mysite.com/anypath?children=true
returns all the child nodes of the current node serialised as per the Content-Type - descendants :
http://www.mysite.com/anypath?descendants=NewsItem
returns all the descendant nodes of the current node serialised as per the Content-Type and can also be comma separated to include multiple DocTypes, empty to signify all descendants or a numeric value i.e. 1 to signify the level of descendants to return :
http://www.mysite.com/anypath?descendants=NewsItem,BlogPost,FAQ
http://www.mysite.com/anypath?descendants=
http://www.mysite.com/anypath?descendants=1
- where / and / or :
http://www.mysite.com/anypath?descendants=NewsItem&where=Summary.Contains('News Flash') and Edition lt 20 or Headline eq true
returns all NewsItems that are descendants of the current node where the Summary property contains the phrase News Flash
Supported operators include :
- eq : ==
- ge : >=
- gt : >
- le : <=
- lt : <
- ne : !=
- select :
http://www.mysite.com/anypath?select=Name,Summary,Description
returns only the properties specified in the select statement - resolvecontent :
http://www.mysite.com/anypath?resolvecontent=RelatedArticles
resolves the comma separated nodes stored in the RelatedArticles property and outputs them as part of an Entities array of nodes - resolvemedia :
http://www.mysite.com/anypath?resolvemedia=PageImage,HeaderImage
resolves the media node and replaces the property value with the resolved NiceUrl - skip & take :
http://www.mysite.com/anypath?descendants=NewsItem&skip=8&take=4
use these switches for paging the data server-side
Of course they can all be used together to create really useful data retrieval scenarios eg :
http://www.mysite.com/anypath?descendants=NewsItem&where=Summary.Contains('News Flash')&resolvemedia=PageImage,NewsImage&skip=8&take=4