Case: HTTP API Monitoring
Introduction to the API Monitoring Case
Systems no longer function by themselves, they push and pull data from other systems and services. Your mobile app may be linked to your backend using an API, you may pull posts from Twitter, use a third party service for URL shortening or even implemented a service oriented architecture within your own platform.
What happens if one of these API's does no longer function like it should? Your first line of defense is proper error handling. However, most APIs provide data critical to your application, so it is still vital to know about anything that is off: A bad review of your app or website is just a few taps away.
Check API Response Time
Most common APIs these days have been implemented on top of HTTP(S), which makes them very suitable to be monitored using the Observu API monitoring service. Doing so will ensure you know about problems with your (or a third party) API as soon as possible. Furthermore you can keep an eye on response times: maybe your app seems slow, but it is actually the server taking a long time to handle the HTTP(S) API request. Observu allow you to track API response time from multiple locations every minute.
API Performance Monitoring
Monitoring API end points for uptime and response times does not just allow you to ensure you are offering the best service possible to your customers. It makes it possible to keep track of performance of those 3rd party services you rely on.
Key Features Of Observu API Monitoring
To support monitoring APIs Observu provides the following key features:
- Customizable HTTP Headers
- Customizable POST request data (urlencoded as well as full raw body)
- HTTP Basic Authentication
- Issue a seperate login request before the actual API call
- Extract data from the API response as metrics
- Support for POST/PUT/DELETE to match your RESTfull API design
2-step Authentication Using Observu API Monitoring
Most APIs we've encountered in the wild actually involve a two step authentication process.
Observu makes it easy to do a login request, then extract e.g. an authorization token from that request and use it on the actual API request you would like to monitor.
The API response can be checked using the Observu API Monitoring solution for specific properties like the presence of certain strings as well as matching more complex regular expressions.
By executing these requests at a regular interval to your API and making sure the API response matches your expectations, you can be sure your API still works like it should.
Leverage Data From APIs
APIs often provide valuable information. You can use regular expressions (regex) to extract data from the API response to be used as metrics in Observu. For example, you could extract the amount of credits left on your 3rd party SMS API and be alerted by the Observu Notification service before you get to zero.