Forum Discussion

leeclemmer's avatar
2 years ago

Data/Metrics on Subscriptions

Hi there, I got a question that I thought would be straight-forward, but doesn't seem to be: "how many users are subscribed to category XYZ?"

Apparently there's no good way to answer this? In looking through the documentation and forum, all I was able to find was this documentation here:

https://developer.khoros.com/khoroscommunitydevdocs/docs/get-a-count-or-list-of-users-subscribed-to-a-board?_ga=2.165259263.1583072279.1692296336-111620096.1668529588

This is using a) the outdated v1 of the API and b) only returns counts for boards, blogs, or Groups. What about Group Hubs and Categories? Is there really no way to get a list of everyone who's subscribed to a particular Category?

Thanks for any help!

  • The current API version you're using seems outdated and doesn't directly support fetching counts for Group Hubs and Categories. Check for a newer API version or explore workarounds like fetching individual user subscriptions and compiling a count. Engage with the developer community for potential solutions or custom scripts. If these options don't yield results, consider suggesting it as a feature request to Khoros' development team.

  • you can also get the nested subscriptions

    https://developer.khoros.com/khoroscommunitydevdocs/docs/retrieve-nested-subscriptions-for-a-node

     

    You can make this call if you logged as an Admin

    https://yourcommunity/api/2.0/search?q=SELECT%20*%20FROM%20subscriptions&restapi.response_style=view&restapi.response_format=json

    However, 

    you can not run this call via Postman, I've tried any possible way and created a Khoros support case and reached to their devs for that, Waiting on the response.

    https://{{hostname}}/api/2.0/search?q=SELECT%20*%20FROM%20subscriptions LIMIT 1000&restapi.session_key={{sessionkey}}

    I can make many of the api calls except of the above... 

    • leeclemmer's avatar
      leeclemmer
      Guide

      Thanks for your comment irach15 . However the problem I've been running into when making LIQL calls against the subscriptions collection is that I'm only getting my own subscriptions; this is also what happened when I put your API call in after being logged on: I only see my own subs. Is this a permission issue?

  • I'd like to know the answer to this too. I've only been able to find per-board subscription metrics and via excel dedupe magic, derive the per category metrics.