Request Endpoints

This page explains the different request endpoints (URIs) you can use to access Google Cloud Storage.

Typical API requests

When making requests directly to one of the Cloud Storage APIs, use the following URLs:

JSON API

  • For JSON API requests, excluding object uploads, use the following endpoint, replacing [VALUES_IN_BRACKETS] with the appropriate values:

    www.googleapis.com/storage/v1/[PATH_TO_RESOURCE]

  • For JSON API object uploads, use the following endpoint, replacing [VALUES_IN_BRACKETS] with the appropriate values:

    www.googleapis.com/upload/storage/v1/[PATH_TO_RESOURCE]

JSON API endpoints only accept HTTPS requests.

XML API

  • For all XML API requests, you can use either of the following endpoints, replacing [VALUES_IN_BRACKETS] with the appropriate values:

    storage.googleapis.com/[BUCKET_NAME]/[OBJECT_NAME]
    [BUCKET_NAME].storage.googleapis.com/[OBJECT_NAME]

Optionally for uploads and downloads, Cloud Storage offers dedicated XML API endpoints. These upload and download endpoints may provide a small performance benefit when transferring large amounts of data.

  • For uploads, you can use either of the following endpoints, replacing [VALUES_IN_BRACKETS] with the appropriate values:

    storage-upload.googleapis.com/[BUCKET_NAME]/[OBJECT_NAME]
    [BUCKET_NAME].storage-upload.googleapis.com/[OBJECT_NAME]

  • For downloads, you can use either of the following endpoints, replacing [VALUES_IN_BRACKETS] with the appropriate values:

    storage-download.googleapis.com/[BUCKET_NAME]/[OBJECT_NAME]
    [BUCKET_NAME].storage-download.googleapis.com/[OBJECT_NAME]

All XML API endpoints support secure sockets layer (SSL) encryption, which means you can use either HTTP or HTTPS. Using HTTPS is recommended, especially if you authenticate to Cloud Storage using OAuth 2.0.

For connections through a proxy, see the FAQ entry on proxies for recommended practices.

CNAME Redirects

A CNAME redirect is a special DNS record that lets you use URLs from your own domain to access resources in Cloud Storage through the XML API without revealing the actual XML API URLs. To do this, the following URI must be added to the host name portion of your CNAME record:

c.storage.googleapis.com.

For example, say your domain is example.com, and you want to make travel maps available to your customers. You can create a bucket in Cloud Storage called travel-maps.example.com, and then create a CNAME record in DNS that redirects requests from travel-maps.example.com to the Cloud Storage URI. To do this, you publish the following CNAME record in DNS:

NAME                      TYPE     DATA
travel-maps.example.com   CNAME    c.storage.googleapis.com.

By doing this, your customers can use the following URL to access a map of Paris:

http://travel-maps.example.com/paris.jpg

Your domain registration service should have a way for you to administer your domain, including adding a CNAME resource record. For example, if you use Google Domains, instructions for adding a resource record can be found on the Google Domains Help page, in the Resource records drop-down section.

Authenticated Browser Downloads

The Cloud Storage authentication and authorization models support authenticated browser downloads. Authenticated browser downloads let an authorized user download data through their browser if they are logged in to their Google account, even if they do not have a Cloud Storage account.

Authenticated browser downloads use cookie-based Google account authentication in conjunction with Google account-based ACLs. To download an object using cookie-based authentication, use the following URL, replacing [VALUES_IN_BRACKETS] with the appropriate values:

https://storage.cloud.google.com/[BUCKET_NAME]/[OBJECT_NAME]

Using HTTPS is strongly recommened when performing authenticated browser downloads, however HTTP is also supported. For more information about authenticated browser downloads, see Cookie-based Authentication.

All requests to the storage.cloud.google.com URI require authentication. This applies even when allUsers have permission to access an object. If you want users to download anonymously accessible objects without authenticating, use the storage.googleapis.com URI documented in Direct API requests. For details and examples, see Accessing Public Data.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Storage