Forum Discussion
I think this should work.
SELECT count(*) FROM messages WHERE tags.text = 'wireless headphones'
See here messages (khoros.com) for more options.
So the full call would be something like this
[Community Domain]/api/2.0/search?q=SELECT%20count(*)%20FROM%20messages%20WHERE%20tags.text%20%3D%20%27wireless%20headphones%27
or with Freemarker
rest("2.0","/search?q=" + "SELECT count(*) FROM messages WHERE tags.text = 'wireless headphones'"?url)
Hello,
Hope to find you well.
I have tried to do this api call:
And it gave the error above... Maybe I'm not doing it well, since I've only made rest apis before.
- Akenefick3 years agoGenius
Hi,
Try doing it through your browser while you are logged into your community in the same browser.
Also if you want more than the count you can add other fields like id to get a list of message ids for messages with that tag or view_href to get links to the posts. SELECT id, view_href, count(*) FROM messages etc.. Just need to encode everything after the equals sign, but it looks like you have that covered.
Related Content
- 7 months ago
- 3 months ago