The Google APIs Discovery API is an innovative API description service that helps make sense of Google APIs. Anyone using this meta-API can find other Google APIs and see the options available from those APIs. And thanks to this new API, ProgrammableWeb has now added “Try It” functionality to several Google API profiles in our directory. Using Google’s Discovery API we dynamically retrive resource and method definitions from Google, then create interactive form fields based on those definitions. So without leaving ProgrammableWeb you can now use select Google APIs like the Google Translate API, as shown in the screenshot below:
Try It gives developers access to a list of API features, that once submitted, the request and response (and optionally, full HTTP headers) are displayed formatted, with syntax highlighting.
We first built Try It over a year ago, supporting a handful of APIs via their profile pages. For example, you can explore Friendfeed and play with Twilio. We created our own WADL (Web Application Description Language) descriptions of each Try It API based on the API documentation. WADL is an XML-based format akin to SOAP’s WSDL. By contract, no manual description is necessary with Google’s Discovery API, which allowed ProgrammableWeb Lead Developer Evan Muehlhausen to implement Try It on six Google APIs in less than a week.
Behind the scenes as you’re using this interactive tool, we’re dynamically calling Google’s API to get the list of methods, then the list of parameters for each method. This lets the same code on our side support any number of APIs just by plugging them in. As Google adds more APIs to their service, then exposes them via their Discovery API, we can then let you try them here.
Google itself uses the Discovery API as infrastructure for a few services it offers. Client Libraries for each Discovery-supported API is generated automatically, as is the Eclipse plugin for each API. Google also has a Try It-like Explorer, which lets developers try out calls for a number of Google APIs in one place.
We currently support six Google APIs:
It’s a testament to the flexibility and utility of Google’s API that we were able to get this running so quickly and certainly there are a variety of development and tools-focused use cases in which Google’s service can be very useful (discovery, code completion, debugging, etc). We’re looking forward to seeing what other uses this type of service enables.
Let us know about issues or what you think in the comments. We may be adding additional Google APIs as we incorporate authentication options into our Try It functionality.