Debugging my API with Apigee
Since the dawn of time (or so it seems) I’ve been maintaining several web sites that let you get subway directions for New York City. I started back in 1996 with a Java applet (which people still use) and over time I’ve migrated to a Google Maps application with a back end hosted in Google App Engine. This latest version, of course, depends on an API to calculate the subway route. Google themselves have since introduced a very nice addition to Google Maps that does this, but my interface is a bit different and sometimes the results are different, so I keep mine happily running as well.
Of course, trying to debug even a simple API like this can be a challenge, especially when it’s being invoked by the browser. How do I see the traffic between the browser and my API? How do I know if the browser is interpreting the response incorrectly or if the API is responding with incorrect data? Google App Engine is great but this kind of debugging isn’t its forte.
Here at Sonoa, the Apigee team has been working hard on a set of new features aimed at developers who produce and consume APIs, including some new features that address exactly my problem. Using the new debug screen in Apigee, I can watch API traffic in real-time, filter it in various ways in case I don’t want to see everything coming my way, and then see exactly what transpired between the client and the API — without changing anything on the client and server at all, since I was sending my API traffic through Apigee anyway. And now that people are using my application in real life, I can leave Apigee in place to see all the analytics that it generates, and then turn on the debug functionality only when I have a specific problem to solve.
