Google Cloud Storage Buckets API

The Buckets API from Google Cloud Storage — 8 operation(s) for buckets.

GitHub OpenAPI
Business capability
IT Infrastructure Management BC-600.50

Operations 13

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

DELETE /storage/v1/b/{bucket} Delete an empty bucket · Delete buckets #
Ask an LLM
“How do I permanently delete a bucket that has no objects in it?”
“What happens to a bucket's objects when the bucket is deleted?”
Tell an agent destructive · confirm first
Delete empty bucket {bucket}.
Permanently remove bucket {bucket} only if its metageneration is {ifMetagenerationMatch}.
GET /storage/v1/b/{bucket} Get a bucket's metadata · Get buckets #
Ask an LLM
“How do I see the location, storage class and ACLs of a bucket?”
“Can I read a bucket's metadata only if its metageneration matches a value?”
Tell an agent
Get bucket {bucket}.
Show the metadata of bucket {bucket} if its metageneration is {ifMetagenerationMatch}.
PATCH /storage/v1/b/{bucket} Partially update a bucket's metadata · Patch buckets #
Ask an LLM
“Can I change just a bucket's labels without resending all its metadata?”
“How do I turn on object versioning on a bucket?”
Tell an agent
Patch bucket {bucket} to set labels {labels}.
Enable versioning on bucket {bucket} by setting {versioning}.
PUT /storage/v1/b/{bucket} Replace a bucket's metadata · Update buckets #
Ask an LLM
“How do I change a bucket's location or storage class?”
“Can I replace a bucket's ACLs in one call?”
Tell an agent
Update bucket {bucket} to storage class {storageClass}.
Replace the ACLs on bucket {bucket} with {acl}.
POST /storage/v1/b/{bucket}/restore Restore a soft-deleted bucket · Restore buckets #
Ask an LLM
“How do I bring back a bucket I soft-deleted?”
“Can I restore a soft-deleted bucket to a specific generation?”
Tell an agent
Restore soft-deleted bucket {bucket} from generation {generation}.
Recover bucket {bucket} as it existed at generation {generation}.
POST /storage/v1/b/{bucket}/relocate Relocate a bucket to a new location · Relocate buckets #
Ask an LLM
“How do I move a bucket to a different region?”
“Can I relocate a bucket to a Custom Dual Region with a custom placement config?”
Tell an agent
Relocate bucket {bucket} to {destinationLocation}.
Move bucket {bucket} to {destinationLocation} using KMS key {destinationKmsKeyName}.
GET /storage/v1/b/{bucket}/iam Get a bucket's IAM policy · Get iam policy buckets #
Ask an LLM
“What roles and members are granted on a bucket?”
“Can I check the IAM policy on a bucket before changing it?”
Tell an agent
Get the IAM policy for bucket {bucket}.
Show bucket {bucket}'s IAM policy in version {optionsRequestedPolicyVersion}.
PUT /storage/v1/b/{bucket}/iam Replace a bucket's IAM policy · Set iam policy buckets #
Ask an LLM
“How do I grant a service account read access to a bucket?”
“Can I replace a bucket's IAM policy with a new set of bindings?”
Tell an agent
Set the IAM policy on bucket {bucket} to {bindings}.
Replace bucket {bucket}'s IAM policy with version {version}.
GET /storage/v1/b/{bucket}/storageLayout Get a bucket's storage layout · Get storage layout buckets #
Ask an LLM
“Which storage classes and locations does a bucket use?”
“Can I check a bucket's storage layout before listing its objects?”
Tell an agent
Get the storage layout of bucket {bucket}.
Show the storage layout of bucket {bucket} under prefix {prefix}.
POST /storage/v1/b Create a bucket · Insert buckets #
Ask an LLM
“How do I create a new Cloud Storage bucket?”
“Can I set a retention policy when creating a bucket?”
Tell an agent
Create bucket {name} in project {project} at {location}.
Create bucket {name} in project {project} with retention policy {retentionPolicy}.
GET /storage/v1/b List buckets in a project · List buckets #
Ask an LLM
“Which buckets exist in my project?”
“Can I list only buckets whose names start with a prefix?”
Tell an agent
List buckets in project {project}.
List buckets in project {project} whose names begin with {prefix}.
POST /storage/v1/b/{bucket}/lockRetentionPolicy Lock a bucket's retention policy · Lock retention policy buckets #
Ask an LLM
“How do I make a bucket's object retention policy permanent?”
“Can I lock a retention policy only if the bucket's metageneration matches a value?”
Tell an agent
Lock the retention policy on bucket {bucket}.
Lock retention policy on bucket {bucket} if its metageneration is {ifMetagenerationMatch}.
GET /storage/v1/b/{bucket}/iam/testPermissions Test permissions on a bucket · Test iam permissions buckets #
Ask an LLM
“Does my service account have read access to a bucket?”
“Which of these permissions does the caller hold on a bucket?”
Tell an agent
Test permissions {permissions} on bucket {bucket}.
Check whether I hold {permissions} on bucket {bucket}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gcp-cloud-storage:gcp-cloud-storage-buckets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gcp-cloud-storage-buckets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloud Storage JSON Buckets API
  version: v1
  description: Generated from Google's published Discovery document for Cloud Storage JSON API (storage v1, revision 20261107). 13 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://storage.googleapis.com
tags:


# --- truncated at 32 KB (73 KB total) ---
# Full source: https://artifacts.apis.io/gcp-cloud-storage/openapi/gcp-cloud-storage-buckets-api-openapi.yml