Clearing Forum & Blog Subscriptions For Users Via The REST API

I'm looking to bulk unsubscribe users from Forums (and Blogs ideally too) using the Rest API.

I can see there is an endpoint that might allow me to do this but it doesn't say what the parameters are:

https://community.telligent.com/community/10/w/api-documentation/61437/set-subscription-application-subscriptions-rest-endpoint

If it requires me to send an userid, application id and flag to subscribe/unsubscribe, this isn't going to be great as I will have to loop over all users and all applications.

Ideally I'd be able to send no application id and clear all subscriptions for a user.

I also saw some issues reported with this here:

https://community.telligent.com/community/10/f/ask-the-community/1145580/get-list-of-users-subscribed-to-blog-via-rest

If none of this is possible then are my only options to run an DB Script, e.g:

delete from [te_Blog_BlogSubscriptions]

delete from cs_TrackedSections

delete from cs_TrackedThreads

Although I'm not sure where Forum thread and forum subscriptions are tracking in v10 as these tables don't seem to exist in the DB now. Have they been renamed/moved?

Any advice on this would be much appreciated.

Thanks

Adam

Parents
  • Subscription listing for any user is not supported. You'd need to impersonate each user, retrieve their subscriptions, and then unsubscribe from specific subscriptions.

    The list endpoint (GET api.ashx/v2/application/subscriptions) takes:

    1. ContainerId (Guid, optional)
    2. ApplicationTypeId (Guid, optional)
    3. TypeId (Guid, optional)
    4. IncludeSubContainers (bool, optional)
    5. PageSize (int, optional)
    6. PageIndex (int, optional)

    The set endpoint (PUT api.ashx/v2/application/subscriptions) takes:

    1. ApplicationId (Guid, required)
    2. ApplicationTypeId (Guid, required)
    3. IsSubscribed (bool, required)
    4. TypeId (Guid, optional)
Reply
  • Subscription listing for any user is not supported. You'd need to impersonate each user, retrieve their subscriptions, and then unsubscribe from specific subscriptions.

    The list endpoint (GET api.ashx/v2/application/subscriptions) takes:

    1. ContainerId (Guid, optional)
    2. ApplicationTypeId (Guid, optional)
    3. TypeId (Guid, optional)
    4. IncludeSubContainers (bool, optional)
    5. PageSize (int, optional)
    6. PageIndex (int, optional)

    The set endpoint (PUT api.ashx/v2/application/subscriptions) takes:

    1. ApplicationId (Guid, required)
    2. ApplicationTypeId (Guid, required)
    3. IsSubscribed (bool, required)
    4. TypeId (Guid, optional)
Children
  • Thanks for getting back to me Ben. I don't think this is going to be feasible given the number of users (41,000) and subscriptions/applications (100s per user). Based on a script I've run recently I was updating prefs for 41,000 users and I had to do 22 requests per user which took 3 days to run due to having to run the script remotely. This would take much longer.

    Therefore I think a database update to remove all existing subscriptions for all users is going to be the only option. Could you let me know the tables where Forum and Blog subscriptions are stored please if possible?