At SmartBear, we are totally jazzed by so many of the cool software initiatives going on right now. One that particularly strikes our fancy is the Open Data initiative, and how the U.S. Government is jumping into the fray with both feet. If you're using any of the government APIs in your project, we recommend you treat them as you would any third-party API. What does that mean? Well, for us, it means that the quality of your application is only as good as the quality of the foundation it’s built upon… and that includes the APIs you use to retrieve data.
To repeat our mantra about third-party APIs:
Know what your choices are. There are a lot of APIs out there, even in the Federal space. Make sure that the API you’ve chosen to use is the one that gives you access to the data you expect.
If you are depending on that API for your application’s core functionality, best to be defensive. If that API doesn’t respond or is modified (or worse, abandoned), you should make sure that you have coded defensively so your application doesn’t fail completely.
Your testing plan should include third-party APIs as well as the APIs you build yourself. Your consumers assume that the quality of your application is your responsibility so it is a good investment of your time to test all of the APIs you rely on.
Even after your APIs pass your tests, you should create production monitors that exercise those APIs regularly. This will make sure that you get notified whenever something unexpected occurs with those APIs.
We’ve put together a little example for you so you can see how to create a test and monitor for one of the Federal APIs, using our Swagger plug-in for SoapUI and our AlertSite for API Monitoring offering.