Forum Discussion
Hi,
This feature seems a bit... well hidden indeed. You can find it only via the REST API's search result preview but not the actual documentation results ;)
Basically you simply add the tagging filter "/tagging/for/tags/text/<tag_string>" to your REST API call like this:
http://lithosphere.lithium.com/restapi/vc/boards/id/studio/tagging/for/tags/text/rest%20api/messages/recent
Further reading: http://lithosphere.lithium.com/t5/rest-api/bd-p/developers-rest-api?leaf-id=Category.tagging#Category.tagging.for.tags.text.tag_text
Hope this helps
- Hi Claudius,
This works for single tag.
what if I want to filter messages of more than one tags.
E.g. I want to filter messages having "tag1" or "tag2" or "tag3" or any combination of selected Tags.- HaidongGLithium Alumni (Retired)
Hi dhiraj_gophane
may you try this?
/restapi/vc/search/messages?q=is_root:true%20AND%20tags:(tag1%20OR%20tag2)
is_root means topics only, no replies, if you want the reply, it will like
/restapi/vc/search/messages?q=tags:(tag1%20OR%20tag2)
I hope that it can help you.
Best Regards
Haidong
btw: if your tag contains space, you will need to use something like
/restapi/vc/search/messages?q=is_root:true%20AND%20tags:(%22test%20space%22)
we are searching for topics with tag="test space" in the above example.
Related Content
- 4 years ago
- 2 years ago