The Cloud Storage JSON API is a simple, JSON-backed interface for accessing and manipulating Cloud Storage projects in a programmatic way. It is fully compatible with the Cloud Storage Client Libraries.
The JSON API is intended for software developers. To use it you should be familiar with web programming and be comfortable creating applications that consume web services through HTTP requests. If this does not describe you, consider one of the following alternatives:
If you are just starting out with Cloud Storage, you should first try either the GCP Console Quickstart or the gsutil Quickstart. These tutorials demonstrate the basics of using Cloud Storage without the need to use the API directly.
If you are a mobile or web app developer, you can use the Firebase SDKs for Cloud Storage.
If you are not a software developer and want to store your personal data in the cloud and share it with others, you can use Google Drive.
The current release of the JSON API is
Activating the API
For new projects, the JSON API is activated by default, and it can be used immediately. Note that you must enable billing for your project before that project can create buckets. All other operations will work immediately.
To enable the JSON API in an existing project, go to the Google Cloud Storage JSON API page in the GCP Console API Library, and click the Enable button.
Encoding URI path parts
When specifying a request URI, encode any parts of the path that contain unsafe
characters or the slash character. For example, if you send a
for the object named
foo/?bar in the bucket
example-bucket, then your
request URI should be:
You do not have to encode the following URI path characters:
Unreserved alphanumeric characters (
Unreserved non-alphanumeric characters (
:) and at-signs (
For more information about using percent-encoded for URIs, see Section 3.3 Path in RFC 3986. Note that encoding is typically handled for you by client libraries, so you can pass the raw object name to them. For more information about object naming conventions, see object name requirements.
Bucket names can not include characters that require encoding.
For more information about JSON API endpoints, see Request endpoints.