Forum Discussion
HaidongG
11 years agoLithium Alumni (Retired)
Hi snaffle ,
fist of all, if there is no particular reason, we should always use "rest()' instead of 'restadmin()', as restadmin() may carry some private inforamtion which should not been seen by normal user.
for your query, is there any chances to convert /boards/id/${coreNode.id}/topics to /boards/id/${coreNode.id}/search/messages/count?q=is_root:true, which has the same effect to bring topic-only nodes. from that you will be able to use sort_by.
last but very minor, it is not necessary to add "restapi.response_style=view" to rest() or restadmin() calls, as both calls with automatically add "restapi.response_style=view" to your query string.
I hope that it helps.
Related Content
- 2 years ago
- 4 years ago