Google APIs Discovery Service
Before Google I/O Google released Google APIs Discovery Service. The propose of this API (or meta-API) is to expose machine readable matadata about other Google APIs.
You can get a list of all APIs (of course this is just part of the all Google APIs 😉 ) supported by Discovery Service:
GET https://www.googleapis.com/discovery/v1/apis
and as the response you will get JSON object with API list. See apis.json.zip, and here we have an example about Buzz API:
{
“kind”: “discovery#directoryItem”,
“id”: “buzz:v1”,
“name”: “buzz”,
“version”: “v1”,
“title”: “Buzz API”,
“description”: “Lets you share updates, photos, videos, and more with your friends around the world”,
“discoveryLink”: “./apis/buzz/v1/rest”,
“icons”: {
“x16”: “http://www.google.com/images/icons/product/buzz-16.png”,
“x32”: “http://www.google.com/images/icons/product/buzz-32.png”
},
“documentationLink”: “http://code.google.com/apis/buzz/v1/using_rest.html”,
“labels”: [ “labs” ],
“preferred”: true
}
Next we can get more information about particular API by using discoveryLink value. This is called “Discovery Document” which includes:
- All the API schemas that describe the API usage.
- Description of methods and parameters.
- OAuth scopes and Authentication information.
- Inline documentation with description of schemas, methods, parameters and parameters values.
Let’s try to get more information about Buzz API:
GET https://www.googleapis.com/discovery/v1/apis/buzz/v1/rest
There are ton of information there. So you may ask “what for?”, the answer is to build tools around the Google APIs. Currently Google use this API to build such great tool as API Explorer and Google Plugin for Eclipse also is using Discovery Service to show you information about API.
Happy Discovers