Skip to content
Software capabilities
Google Cloud Run

List revisions for a Cloud Run service

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.

Documentation reviewed · 2 methods with sources

Ways to do it

  1. API: GET /v2/{parent}/revisions
  2. CLI: gcloud run revisions list --service
API

GET /v2/{parent}/revisions

List revisions under a Cloud Run service and pass nextPageToken as pageToken to retrieve more. Set showDeleted to include unexpired deleted revisions.

Read source: Cloud Run revisions.list reference
Requirements
A Google Cloud project, a service resource parent, run.revisions.list permission, and OAuth credentials with cloud-platform scope.
Limitations
Deleted revisions appear only while they remain unexpired, and page tokens must be reused with the same list parameters.

Example shell

curl --fail -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" "https://run.googleapis.com/v2/projects/$PROJECT/locations/$REGION/services/$SERVICE/revisions?pageSize=100&showDeleted=true"
CLI

gcloud run revisions list --service

List revisions for a Cloud Run service and use filters, limits, or a selected region from the Cloud SDK.

Read source: gcloud run revisions list reference
Requirements
The gcloud CLI authenticated to the project and permission to list Cloud Run revisions for the service.
Limitations
A --limit value caps the total results. Use --page-size if you only need to tune the number requested per page.

Example shell

gcloud run revisions list --service "$SERVICE" --region "$REGION" --format=json