Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I want to get the list of subscriptions and consequently, the users that receive said subscriptions.
Using the Qlik Dev APIs I can get the list of alerts using "/v1/data-alerts", but can't find an API Path which I can call to return me the list of subscriptions that currently exist.
Any help on how I can achieve this?
In the API world, subscriptions share an API with monitored charts and tabular report tasks.
https://qlik.dev/apis/rest/sharing-tasks/
To get subscriptions you can use these two endpoints for chart and sheet subscriptions respectively:
/api/v1/sharing-tasks?type=chart-sharing
/api/v1/sharing-tasks?type=sheet-sharing
In the API world, subscriptions share an API with monitored charts and tabular report tasks.
https://qlik.dev/apis/rest/sharing-tasks/
To get subscriptions you can use these two endpoints for chart and sheet subscriptions respectively:
/api/v1/sharing-tasks?type=chart-sharing
/api/v1/sharing-tasks?type=sheet-sharing
Thank you very much! That returns what I wanted, but I'm having a small set back.
Calling the individual sharing-task with "/v1/sharing-tasks/{taskId}" seemingly returns all the information about said task, but the recipients comes empty when I know the one I checked has at least 3 users as recipients.
I can see the recipients in the QMC, so any idea what might cause the information to not show?
I don't see that. When I check the JSON returned by doing a GET on a single sharing-task I see a 'value' property for the recipient which is the same as the 'userId'
Thank you for your help so far. I foud out my problem.
I'm not getting any user because the API key I'm using was made with my user, and I'm not the owner of the subscriptions. This doesn't happen with the data-alerts where I can see the users of the alert irregardly if I'm the owner or not.
Any last tip on how can I possibly circunvent this? Or it's not possible?
Just has a reference, my user has all possible permissions and has access to all the spaces that exist in the machine.
I'll make some inquiries. I've had this question before and short of creating an API key for each user and cycling your API call through each key, there may not be an easy answer at the moment.
thanks @marcelinoa and @JonnyPoole for the discussion, I have reviewed internally and logged an issue accordingly. I can't offer a timeline for resolution however the intent will be to bring the subscription call to return the recipient list.
Thank you for your help @Andrew_Kruger and @JonnyPoole . Going to mark the first reply has the answer since that is the most relevant to the question.
Until further change I'll just make it so every subscription is created by one user and the API key is generated by the same user.