With the Capabilities API, your application can detect outages and scheduled downtime for specific API capabilities. You can use this API to reduce downtime in your application by detecting when a capability is unavailable and then bypassing it.
For example, if you use the Datastore API, you can use the Capabilities API to detect when the Datastore API is unavailable and report an error to the user:
You can separately query for the availability of Datastore reads and writes. The following sample shows how to detect the availability of Datastore writes and, during downtime, provide a message to users:
Using the Capabilities API in Go
capability.Enabled function returns true if the provided API and capability are available. You must pass either a capability name (such as
"write") or the wildcard
"*" to query all capabilities of the API.
The API currently supports the following capabilities:
|Availability of the blobstore||
|Availability of the Mail service||
|Availability of the Memcache service||
|Availability of the Task Queue service||
|Availability of the URL Fetch service||
|Availability of the XMPP service||