Jenish Jerome
Jenish Jerome

Reputation: 352

How do I detect or watch data changes in APIs?

I will get JSON data from a API, and want to watch for changes in the API. If data changes in the API, I have to fetch the new data and send notifications to my clients.

How do I observe for data changes? I thought of setting an interval between successive Ajax calls, but it would be an effective way.

Any ideas or libraries available for JavaScript or nodejs that will fire events whenever the data in a API changes?

Upvotes: 0

Views: 2615

Answers (1)

S M Kajemul Haque
S M Kajemul Haque

Reputation: 161

You have to check data changes in the server side. Like if you update a blog and want to send a notification to the user about a blog is updated then you have to send the notification (email) when you updating the blog (there will be a method or SQL query to update the blog data or post).

Please let me know if you addressing different thing.

Upvotes: 4

Related Questions