Capabilities Java API Overview
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 Images API to resize images, you can use the Capabilities API to detect when the Images API is unavailable and skip the resize:
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 Java
Each Capability is represented as a static constant on the Capability class (such as Capability.DATASTORE_WRITE
). Each Capability has a state, which you can retrieve from CapabilitiesService.getStatus(Capability)
. Each state has a status, which is an enumeration reflecting a the availability of a capability: either ENABLED
or DISABLED
. See below for the list of services currently enabled in this API.
Supported capabilities
The API currently supports the following capabilities:
Capability | Arguments to |
---|---|
Availability of the blobstore | |
Datastore reads | |
Datastore writes | |
Availability of the Images service | |
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 |