I'm hoping I just overlooked something in the documentation. Is there an API endpoint that will return all subscriptions a user has (e.g. following, application, thread, post, etc.) without iterating through every application/object on the site?
I'm hoping I just overlooked something in the documentation. Is there an API endpoint that will return all subscriptions a user has (e.g. following, application, thread, post, etc.) without iterating through every application/object on the site?
These are different types of things, there is no one endpoint that will get you all of these things together. There are endpoints for each, however:
Applications: List Application Subscription REST Endpoint will return applications for current user (along with any other filters you provide)
Following: List Following REST Endpoint will return a list of followed users for the provided id
Content: List Content Subscription REST Endpoint similar to Applications
Thanks. I did not consider running as a specific user for each of those endpoints and was hoping for a more external approach (get data about user not get data as user).
Our use case is to figure out old accounts that have no current or former interaction with the site beyond account creation vs those who are still lurking but not posting.
The In-Process Users API includes the capability to RunAs another user. You could leverage this either in a scheduled job that runs regularly to check old accounts as you mentioned, performing any lookups using the RunAs block; or in custom Rest Endpoints that accept UserId as an additional parameter and perform the RunAs block wrapping the in-process API.
Looping back around here with another option: the Rest-Impersonate-User header can be used as the REST equivalent of RunAs.