Cloud Storage JSON API
Stores and retrieves potentially large, immutable data objects.
Developer tools#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Stores and retrieves potentially large, immutable data objects.
Endpoints 86
anywhereCaches
- POSTDisables an Anywhere Cache instance.
/b/:bucket/anywhereCaches/:anywhereCacheId/disableDisables an Anywhere Cache instance. - GETReturns the metadata of an Anywhere Cache instance.
/b/:bucket/anywhereCaches/:anywhereCacheIdReturns the metadata of an Anywhere Cache instance. - PATCHUpdates the config of an Anywhere Cache instance.
/b/:bucket/anywhereCaches/:anywhereCacheIdUpdates the config of an Anywhere Cache instance. - GETReturns a list of Anywhere Cache instances of the bucket matching the criteria.
/b/:bucket/anywhereCaches?pageSize=0&pageToken=stringReturns a list of Anywhere Cache instances of the bucket matching the criteria. - POSTCreates an Anywhere Cache instance.
/b/:bucket/anywhereCachesCreates an Anywhere Cache instance. - POSTResumes a disabled Anywhere Cache instance.
/b/:bucket/anywhereCaches/:anywhereCacheId/resumeResumes a disabled Anywhere Cache instance.
bucketAccessControls
- GETReturns the ACL entry for the specified entity on the specified bucket.
/b/:bucket/acl/:entity?userProject=stringReturns the ACL entry for the specified entity on the specified bucket. - PUTUpdates an ACL entry on the specified bucket.
/b/:bucket/acl/:entity?userProject=stringUpdates an ACL entry on the specified bucket. - DELETEPermanently deletes the ACL entry for the specified entity on the specified bucket.
/b/:bucket/acl/:entity?userProject=stringPermanently deletes the ACL entry for the specified entity on the specified bucket. - PATCHPatches an ACL entry on the specified bucket.
/b/:bucket/acl/:entity?userProject=stringPatches an ACL entry on the specified bucket. - GETRetrieves ACL entries on the specified bucket.
/b/:bucket/acl?userProject=stringRetrieves ACL entries on the specified bucket. - POSTCreates a new ACL entry on the specified bucket.
/b/:bucket/acl?userProject=stringCreates a new ACL entry on the specified bucket.
buckets
- GETReturns metadata for the specified bucket.
/b/:bucket?generation=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&projection=full&softDeleted=true&userProject=stringReturns metadata for the specified bucket. - PUTUpdates a bucket
/b/:bucket?ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&predefinedAcl=authenticatedRead&predefinedDefaultObjectAcl=authenticatedRead&projection=full&userProject=stringUpdates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. - DELETEDeletes an empty bucket
/b/:bucket?ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&userProject=stringDeletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket. - PATCHPatches a bucket
/b/:bucket?ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&predefinedAcl=authenticatedRead&predefinedDefaultObjectAcl=authenticatedRead&projection=full&userProject=stringPatches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. - GETReturns an IAM policy for the specified bucket.
/b/:bucket/iam?optionsRequestedPolicyVersion=0&userProject=stringReturns an IAM policy for the specified bucket. - PUTUpdates an IAM policy for the specified bucket.
/b/:bucket/iam?userProject=stringUpdates an IAM policy for the specified bucket. - GETReturns the storage layout configuration for the specified bucket
/b/:bucket/storageLayout?prefix=stringReturns the storage layout configuration for the specified bucket. Note that this operation requires storage.objects.list permission. - GETRetrieves a list of buckets for a given project.
/b?maxResults=0&pageToken=string&prefix=string&project=string&projection=full&returnPartialSuccess=true&softDeleted=true&userProject=stringRetrieves a list of buckets for a given project. - POSTCreates a new bucket.
/b?enableObjectRetention=true&predefinedAcl=authenticatedRead&predefinedDefaultObjectAcl=authenticatedRead&project=string&projection=full&userProject=stringCreates a new bucket. - POSTLocks retention policy on a bucket.
/b/:bucket/lockRetentionPolicy?ifMetagenerationMatch=string&userProject=stringLocks retention policy on a bucket. - POSTInitiates a long-running Relocate Bucket operation on the specified bucket.
/b/:bucket/relocateInitiates a long-running Relocate Bucket operation on the specified bucket. - POSTRestores a soft-deleted bucket.
/b/:bucket/restore?generation=string&projection=full&userProject=stringRestores a soft-deleted bucket. - GETTests a set of permissions on the given bucket to see which, if any, are held by the caller.
/b/:bucket/iam/testPermissions?permissions=string&userProject=stringTests a set of permissions on the given bucket to see which, if any, are held by the caller.
defaultObjectAccessControls
- GETReturns the default object ACL entry for the specified entity on the specified bucket.
/b/:bucket/defaultObjectAcl/:entity?userProject=stringReturns the default object ACL entry for the specified entity on the specified bucket. - PUTUpdates a default object ACL entry on the specified bucket.
/b/:bucket/defaultObjectAcl/:entity?userProject=stringUpdates a default object ACL entry on the specified bucket. - DELETEPermanently deletes the default object ACL entry for the specified entity on the specified bucket.
/b/:bucket/defaultObjectAcl/:entity?userProject=stringPermanently deletes the default object ACL entry for the specified entity on the specified bucket. - PATCHPatches a default object ACL entry on the specified bucket.
/b/:bucket/defaultObjectAcl/:entity?userProject=stringPatches a default object ACL entry on the specified bucket. - GETRetrieves default object ACL entries on the specified bucket.
/b/:bucket/defaultObjectAcl?ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&userProject=stringRetrieves default object ACL entries on the specified bucket. - POSTCreates a new default object ACL entry on the specified bucket.
/b/:bucket/defaultObjectAcl?userProject=stringCreates a new default object ACL entry on the specified bucket.
folders
- GETReturns metadata for the specified folder
/b/:bucket/folders/:folder?ifMetagenerationMatch=string&ifMetagenerationNotMatch=stringReturns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled. - DELETEPermanently deletes a folder
/b/:bucket/folders/:folder?ifMetagenerationMatch=string&ifMetagenerationNotMatch=stringPermanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled. - POSTDeletes a folder recursively
/b/:bucket/folders/:folder/deleteRecursive?ifMetagenerationMatch=string&ifMetagenerationNotMatch=stringDeletes a folder recursively. Only applicable to buckets with hierarchical namespace enabled. - GETRetrieves a list of folders matching the criteria
/b/:bucket/folders?delimiter=string&endOffset=string&pageSize=0&pageToken=string&prefix=string&startOffset=stringRetrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical namespace enabled. - POSTCreates a new folder
/b/:bucket/folders?recursive=trueCreates a new folder. Only applicable to buckets with hierarchical namespace enabled. - POSTRenames a source folder to a destination folder
/b/:bucket/folders/:sourceFolder/renameTo/folders/:destinationFolder?ifSourceMetagenerationMatch=string&ifSourceMetagenerationNotMatch=stringRenames a source folder to a destination folder. Only applicable to buckets with hierarchical namespace enabled.
managedFolders
- GETReturns metadata of the specified managed folder.
/b/:bucket/managedFolders/:managedFolder?ifMetagenerationMatch=string&ifMetagenerationNotMatch=stringReturns metadata of the specified managed folder. - DELETEPermanently deletes a managed folder.
/b/:bucket/managedFolders/:managedFolder?allowNonEmpty=true&ifMetagenerationMatch=string&ifMetagenerationNotMatch=stringPermanently deletes a managed folder. - PATCHUpdates a managed folder using patch semantics.
/b/:bucket/managedFolders/:managedFolder?ifMetagenerationMatch=string&ifMetagenerationNotMatch=stringUpdates a managed folder using patch semantics. - GETReturns an IAM policy for the specified managed folder.
/b/:bucket/managedFolders/:managedFolder/iam?optionsRequestedPolicyVersion=0&userProject=stringReturns an IAM policy for the specified managed folder. - PUTUpdates an IAM policy for the specified managed folder.
/b/:bucket/managedFolders/:managedFolder/iam?userProject=stringUpdates an IAM policy for the specified managed folder. - GETLists managed folders in the given bucket.
/b/:bucket/managedFolders?pageSize=0&pageToken=string&prefix=stringLists managed folders in the given bucket. - POSTCreates a new managed folder.
/b/:bucket/managedFoldersCreates a new managed folder. - GETTests a set of permissions on the given managed folder to see which, if any, are held by the caller.
/b/:bucket/managedFolders/:managedFolder/iam/testPermissions?permissions=string&userProject=stringTests a set of permissions on the given managed folder to see which, if any, are held by the caller.
notifications
- GETView a notification configuration.
/b/:bucket/notificationConfigs/:notification?userProject=stringView a notification configuration. - DELETEPermanently deletes a notification subscription.
/b/:bucket/notificationConfigs/:notification?userProject=stringPermanently deletes a notification subscription. - GETRetrieves a list of notification subscriptions for a given bucket.
/b/:bucket/notificationConfigs?userProject=stringRetrieves a list of notification subscriptions for a given bucket. - POSTCreates a notification subscription for a given bucket.
/b/:bucket/notificationConfigs?userProject=stringCreates a notification subscription for a given bucket.
objectAccessControls
- GETReturns the ACL entry for the specified entity on the specified object.
/b/:bucket/o/:object/acl/:entity?generation=string&userProject=stringReturns the ACL entry for the specified entity on the specified object. - PUTUpdates an ACL entry on the specified object.
/b/:bucket/o/:object/acl/:entity?generation=string&userProject=stringUpdates an ACL entry on the specified object. - DELETEPermanently deletes the ACL entry for the specified entity on the specified object.
/b/:bucket/o/:object/acl/:entity?generation=string&userProject=stringPermanently deletes the ACL entry for the specified entity on the specified object. - PATCHPatches an ACL entry on the specified object.
/b/:bucket/o/:object/acl/:entity?generation=string&userProject=stringPatches an ACL entry on the specified object. - GETRetrieves ACL entries on the specified object.
/b/:bucket/o/:object/acl?generation=string&userProject=stringRetrieves ACL entries on the specified object. - POSTCreates a new ACL entry on the specified object.
/b/:bucket/o/:object/acl?generation=string&userProject=stringCreates a new ACL entry on the specified object.
objects
- POSTInitiates a long-running bulk restore operation on the specified bucket.
/b/:bucket/o/bulkRestoreInitiates a long-running bulk restore operation on the specified bucket. - POSTConcatenates a list of existing objects into a new object in the same bucket.
/b/:destinationBucket/o/:destinationObject/compose?destinationPredefinedAcl=authenticatedRead&dropContextGroups=string&ifGenerationMatch=string&ifMetagenerationMatch=string&kmsKeyName=string&userProject=stringConcatenates a list of existing objects into a new object in the same bucket. - POSTCopies a source object to a destination object
/b/:sourceBucket/o/:sourceObject/copyTo/b/:destinationBucket/o/:destinationObject?destinationKmsKeyName=string&destinationPredefinedAcl=authenticatedRead&ifGenerationMatch=string&ifGenerationNotMatch=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&ifSourceGenerationMatch=string&ifSourceGenerationNotMatch=string&ifSourceMetagenerationMatch=string&ifSourceMetagenerationNotMatch=string&projection=full&sourceGeneration=string&userProject=stringCopies a source object to a destination object. Optionally overrides metadata. - GETRetrieves an object or its metadata.
/b/:bucket/o/:object?generation=string&ifGenerationMatch=string&ifGenerationNotMatch=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&projection=full&restoreToken=string&softDeleted=true&userProject=stringRetrieves an object or its metadata. - PUTUpdates an object's metadata.
/b/:bucket/o/:object?generation=string&ifGenerationMatch=string&ifGenerationNotMatch=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&overrideUnlockedRetention=true&predefinedAcl=authenticatedRead&projection=full&userProject=stringUpdates an object's metadata. - DELETEDeletes an object and its metadata
/b/:bucket/o/:object?generation=string&ifGenerationMatch=string&ifGenerationNotMatch=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&userProject=stringDeletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used. - PATCHPatches an object's metadata.
/b/:bucket/o/:object?generation=string&ifGenerationMatch=string&ifGenerationNotMatch=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&overrideUnlockedRetention=true&predefinedAcl=authenticatedRead&projection=full&userProject=stringPatches an object's metadata. - GETReturns an IAM policy for the specified object.
/b/:bucket/o/:object/iam?generation=string&userProject=stringReturns an IAM policy for the specified object. - PUTUpdates an IAM policy for the specified object.
/b/:bucket/o/:object/iam?generation=string&userProject=stringUpdates an IAM policy for the specified object. - GETRetrieves a list of objects matching the criteria.
/b/:bucket/o?delimiter=string&endOffset=string&filter=string&includeFoldersAsPrefixes=true&includeTrailingDelimiter=true&matchGlob=string&maxResults=0&pageToken=string&prefix=string&projection=full&softDeleted=true&startOffset=string&userProject=string&versions=trueRetrieves a list of objects matching the criteria. - POSTStores a new object and metadata.
/b/:bucket/o?contentEncoding=string&ifGenerationMatch=string&ifGenerationNotMatch=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&kmsKeyName=string&name=string&predefinedAcl=authenticatedRead&projection=full&userProject=stringStores a new object and metadata. - POSTMoves the source object to the destination object in the same bucket.
/b/:bucket/o/:sourceObject/moveTo/o/:destinationObject?ifGenerationMatch=string&ifGenerationNotMatch=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&ifSourceGenerationMatch=string&ifSourceGenerationNotMatch=string&ifSourceMetagenerationMatch=string&ifSourceMetagenerationNotMatch=string&projection=full&userProject=stringMoves the source object to the destination object in the same bucket. - POSTRestores a soft-deleted object.
/b/:bucket/o/:object/restore?copySourceAcl=true&generation=string&ifGenerationMatch=string&ifGenerationNotMatch=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&projection=full&restoreToken=string&userProject=stringRestores a soft-deleted object. - POSTRewrites a source object to a destination object
/b/:sourceBucket/o/:sourceObject/rewriteTo/b/:destinationBucket/o/:destinationObject?destinationKmsKeyName=string&destinationPredefinedAcl=authenticatedRead&dropContextGroups=string&ifGenerationMatch=string&ifGenerationNotMatch=string&ifMetagenerationMatch=string&ifMetagenerationNotMatch=string&ifSourceGenerationMatch=string&ifSourceGenerationNotMatch=string&ifSourceMetagenerationMatch=string&ifSourceMetagenerationNotMatch=string&maxBytesRewrittenPerCall=string&projection=full&rewriteToken=string&sourceGeneration=string&userProject=stringRewrites a source object to a destination object. Optionally overrides metadata. - GETTests a set of permissions on the given object to see which, if any, are held by the caller.
/b/:bucket/o/:object/iam/testPermissions?generation=string&permissions=string&userProject=stringTests a set of permissions on the given object to see which, if any, are held by the caller. - GETRetrieves a specific object context with its extended data for a given object.
/b/:bucket/o/:object/viewFullContext?contextKey=string&generation=string&userProject=stringRetrieves a specific object context with its extended data for a given object.
operations
- POSTStarts asynchronous advancement of the relocate bucket operation in the case of required write downtime, to allow it…
/b/:bucket/operations/:operationId/advanceRelocateBucketStarts asynchronous advancement of the relocate bucket operation in the case of required write downtime, to allow it to lock the bucket at the source… - POSTStarts asynchronous cancellation on a long-running operation
/b/:bucket/operations/:operationId/cancelStarts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. - GETGets the latest state of a long-running operation.
/b/:bucket/operations/:operationIdGets the latest state of a long-running operation. - GETLists operations that match the specified filter in the request.
/b/:bucket/operations?filter=string&pageSize=0&pageToken=stringLists operations that match the specified filter in the request.
projects.hmacKeys
- GETRetrieves a list of HMAC keys matching the criteria.
/projects/:projectId/hmacKeys?maxResults=0&pageToken=string&serviceAccountEmail=string&showDeletedKeys=true&userProject=stringRetrieves a list of HMAC keys matching the criteria. - POSTCreates a new HMAC key for the specified service account.
/projects/:projectId/hmacKeys?serviceAccountEmail=string&userProject=stringCreates a new HMAC key for the specified service account. - GETRetrieves an HMAC key's metadata
/projects/:projectId/hmacKeys/:accessId?userProject=stringRetrieves an HMAC key's metadata - PUTUpdates the state of an HMAC key
/projects/:projectId/hmacKeys/:accessId?userProject=stringUpdates the state of an HMAC key. See the HMAC Key resource descriptor for valid states. - DELETEDeletes an HMAC key.
/projects/:projectId/hmacKeys/:accessId?userProject=stringDeletes an HMAC key.
projects.serviceAccount
- GETGet the email address of this project's Google Cloud Storage service account.
/projects/:projectId/serviceAccount?userProject=stringGet the email address of this project's Google Cloud Storage service account.
rapidCaches
- POSTDisables a Rapid Cache instance.
/b/:bucket/rapidCaches/:rapidCacheId/disableDisables a Rapid Cache instance. - GETReturns the metadata of a Rapid Cache instance.
/b/:bucket/rapidCaches/:rapidCacheIdReturns the metadata of a Rapid Cache instance. - PATCHUpdates the configuration of a Rapid Cache instance.
/b/:bucket/rapidCaches/:rapidCacheIdUpdates the configuration of a Rapid Cache instance. - GETReturns a list of Rapid Cache instances of the bucket.
/b/:bucket/rapidCaches?pageSize=0&pageToken=stringReturns a list of Rapid Cache instances of the bucket. - POSTCreates a Rapid Cache instance.
/b/:bucket/rapidCachesCreates a Rapid Cache instance.
API details
- Base URL
https://storage.googleapis.com/storage/v1- Authentication
- OAuth 2.0 (authorization code flow) with 5 scopes
An API key in the key query parameter - Operations
- 86 operations on 49 pathsGET 33POST 27PUT 9DELETE 9PATCH 8
- Main resources
- objects 16buckets 13managedFolders 8anywhereCaches 6bucketAccessControls 6defaultObjectAccessControls 6folders 6objectAccessControls 6projects.hmacKeys 5rapidCaches 5
- Response formats
application/json- Description format
- Google API Discovery, API version
v1 - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the Cloud Storage JSON API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Cloud Storage JSON API collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 5 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Disables an Anywhere Cache instance.” (POST /b/:bucket/anywhereCaches/:anywhereCacheId/disable), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Cloud Storage JSON API?
Stores and retrieves potentially large, immutable data objects. It is listed under Developer tools and has 86 endpoints.
Who publishes the Cloud Storage JSON API?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Cloud Storage JSON API?
Requests go to https://storage.googleapis.com/storage/v1. Endpoint paths are added to this base URL.
How do I authenticate with the Cloud Storage JSON API?
It accepts 2 methods: OAuth 2.0 (authorization code flow) with 5 scopes; an API key in the key query parameter.
How many endpoints does the Cloud Storage JSON API have?
86 operations on 49 paths (33 GET, 27 POST, 9 PUT, 9 DELETE, 8 PATCH). The largest groups are objects, buckets, managedFolders, anywhereCaches.
Is forking the Cloud Storage JSON API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.