.netrestpushapi-design

Push notifications for data events in an API


I'm writing an API using REST for my SaaS application. For the most part users will call the API to query, update, and insert data based on events in their other systems. At times though, the users want to be notified when certain events occur in our system so they can update their other systems. I'm trying to figure out an easy way to do the latter (a push notification).

My first thought was to have an RSS feed that the user can subscribe to. Then as events occur they'd get a notification with the basics (Id of record, Description of change, etc). If they are interested in the data that changed they can query the API to get further details.

My application is written in .Net with a SQL Server back end. Does this sound like a legitimate strategy, any other ideas, need any other details?


Solution

  • You should lok into pubsubhubhub. It is an open protocol that supports push through web-hooks of your changelog RSS feed.