Canonical: https://weaveos.com/reference/google-cloud-storage/list-object-generations

1. [Software capabilities](https://weaveos.com/reference)
2. /[Google Cloud Storage](https://weaveos.com/reference/google-cloud-storage)
3. /List object generations in Google Cloud Storage

[![](https://weaveos.com/reference/logos/google-cloud-storage.svg)Google Cloud Storage](https://weaveos.com/reference/google-cloud-storage)

# List object generations in Google Cloud Storage

Use the JSON API or gcloud storage ls to inspect object versions and generations in a bucket. Keep the version flag explicit when reconciling historical objects.

Documentation reviewed November 27, 2026 · 2 methods with sources

## Ways to do it

1. [1API: GET /storage/v1/b/{bucket}/o?versions=true](https://weaveos.com/reference/google-cloud-storage/list-object-generations#method-1)
2. [2CLI: gcloud storage ls --all-versions](https://weaveos.com/reference/google-cloud-storage/list-object-generations#method-2)

API

### GET /storage/v1/b/{bucket}/o?versions=true

List objects in a bucket with version entries and continue with pageToken.

[Read source: Cloud Storage objects.list reference](https://cloud.google.com/storage/docs/json_api/v1/objects/list)

- Requirements

  A Google Cloud project, storage.objects.list permission on the bucket, OAuth or service-account credentials, and the bucket name.

- Limitations

  The versions and softDeleted parameters are mutually exclusive. softDeleted only works when the bucket has a soft delete policy.

Example shell

Copy

```
curl --fail -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" "https://storage.googleapis.com/storage/v1/b/$BUCKET/o?versions=true&maxResults=100"
```

CLI

### gcloud storage ls --all-versions

List a bucket or object path from the Cloud SDK and include all object generations.

[Read source: gcloud storage ls reference](https://cloud.google.com/sdk/gcloud/reference/storage/ls)

- Requirements

  The gcloud CLI authenticated to a project with permission to list the bucket and a bucket URI such as gs\://example-bucket.

- Limitations

  Use --recursive when you need objects below nested prefixes. Use --json for machine-readable metadata.

Example shell

Copy

```
gcloud storage ls --all-versions --recursive --json "gs://$BUCKET"
```

## More from Google Cloud Storage

[View all 1 Google Cloud Storage tasks](https://weaveos.com/reference/google-cloud-storage)

## The same task in other apps

- [![](https://weaveos.com/reference/logos/bitbucket.svg)Bitbucket Cloud](https://weaveos.com/reference/bitbucket)

  ### [List open pull requests in Bitbucket Cloud](https://weaveos.com/reference/bitbucket/list-open-pull-requests)

  List open pull requests for a repository with the Bitbucket API, or browse them in the Atlassian extension for VS Code. Use the API’s state filter when a report also needs merged or declined pull requests.

  API, Interface

- [![](https://weaveos.com/reference/logos/google-cloud-run.svg)Google Cloud Run](https://weaveos.com/reference/google-cloud-run)

  ### [List revisions for a Cloud Run service](https://weaveos.com/reference/google-cloud-run/list-service-revisions)

  Use the Cloud Run REST method when automation needs revision metadata. Use gcloud run revisions list to inspect the same service interactively or in scripts.

  API, CLI

- [![](https://weaveos.com/reference/logos/confluent-cloud.png)Confluent Cloud](https://weaveos.com/reference/confluent-cloud)

  ### [List Confluent Cloud Kafka topics](https://weaveos.com/reference/confluent-cloud/list-kafka-topics)

  Confluent Cloud lists topics through the Kafka REST API or Confluent CLI. Both methods are read-only and return the topics visible on a specified Kafka cluster.

  API, CLI

- [![](https://weaveos.com/reference/logos/azure-blob-storage.svg)Azure Blob Storage](https://weaveos.com/reference/azure-blob-storage)

  ### [How to list Azure Blob Storage versions](https://weaveos.com/reference/azure-blob-storage/list-blob-versions)

  Use List Blobs with include=versions for a programmatic inventory, or use az storage blob list --include v for a terminal inspection.

  API, CLI
