Query API calls like
http://api.cloudcms.com/docs#!/node/post_repositories_repositoryId_branches_branchId_nodes_query
support a parameter named _fields
which defines an object specifying the node properties you want to include in the result set for matching nodes.
For example in the following query I want the title
, subTitle
and slug
fields returned:
{ "_type":"my:article", "_fields":{ "title":1, "subTitle":1, "slug":1 } }
The result set would look something like the following. Note that "_doc" is always returned for each node:
{ "rows": [{ "title": "Economics of Chronic Diseases", "slug": "economics-of-chronic-diseases", "subTitle": "", "_doc": "5ce793471d775066206b" }, { "title": "EU governments weaken tobacco restrictions", "slug": "eu-governments-weaken-tobacco-restrictions", "subTitle": "", "_doc": "d8a47dad5105d8e4e59e" }, { "title": "Dutch Supreme Court decision: all small bars and cafes must be 100% smoke free", "slug": "dutch-supreme-court-decision-all-small-bars-and-cafes-must-be-100-smoke-free", "subTitle": "",
"_doc": "d93eefdd94dfd5057c1c" } ]