Releasing our new API endpoint last month has already enabled us to release the oldest feature request: subscribing and retrieving feeds in one single call. Today, we’re introducing another long time requested feature: the ability to list PubSubHubbub subscriptions.
Listing subscriptions per endpoint
It’s considered good practice when using PubSubHubbub to use different callback urls for each susbcription performed. This way it’s much easier to debug, load balance (consistently!) or even handle notifications faster.
Our new API call allows you to quickly retrieve the susbcription matching a given callback url. It also allows for the inclusion of a wildcard character
% to retrieve all subscriptions matching a given callback url template.
For example, when construction callback urls, it makes sense to include state information in them, like, maybe, a category for the feed. We could then use something like
https://mydomain.tld/push/tech/81239 for the feed 81239 in the ‘tech’ category.
It now becomes very easy to retrieve all subscriptions in the tech category by doing something like:
Of course, the callback url can be just
%, and as you can see in this example, the subscriptions are listed with pages of up to 20 elements. Include a
page parameter to navigate thru them.