Google Cloud Run Revisions API

Operations for managing service revisions

OpenAPI Specification

google-cloud-run-revisions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Run Admin Jobs Revisions API
  description: The Cloud Run Admin API deploys and manages user-provided container images as serverless services. It supports creating, updating, and deleting services, managing revisions and traffic splitting, executing jobs, and configuring domain mappings.
  version: v2
  contact:
    name: Google Cloud
    url: https://cloud.google.com/run
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://run.googleapis.com/v2
  description: Google Cloud Run Admin API v2
security:
- oauth2: []
tags:
- name: Revisions
  description: Operations for managing service revisions
paths:
  /projects/{projectId}/locations/{location}/services/{serviceId}/revisions:
    get:
      operationId: listRevisions
      summary: Google Cloud Run List revisions
      description: Lists revisions for a given service in the given project and location.
      tags:
      - Revisions
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: serviceId
        in: path
        required: true
        schema:
          type: string
      - name: pageSize
        in: query
        schema:
          type: integer
      - name: pageToken
        in: query
        schema:
          type: string
      - name: showDeleted
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRevisionsResponse'
  /projects/{projectId}/locations/{location}/services/{serviceId}/revisions/{revisionId}:
    get:
      operationId: getRevision
      summary: Google Cloud Run Get a revision
      description: Gets information about a revision.
      tags:
      - Revisions
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: serviceId
        in: path
        required: true
        schema:
          type: string
      - name: revisionId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Revision'
    delete:
      operationId: deleteRevision
      summary: Google Cloud Run Delete a revision
      description: Deletes a revision.
      tags:
      - Revisions
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: serviceId
        in: path
        required: true
        schema:
          type: string
      - name: revisionId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response with long-running operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
components:
  schemas:
    Revision:
      type: object
      properties:
        name:
          type: string
        uid:
          type: string
        generation:
          type: string
        labels:
          type: object
          additionalProperties:
            type: string
        createTime:
          type: string
          format: date-time
        updateTime:
          type: string
          format: date-time
        launchStage:
          type: string
        service:
          type: string
        scaling:
          type: object
          properties:
            minInstanceCount:
              type: integer
            maxInstanceCount:
              type: integer
        containers:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              image:
                type: string
        conditions:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              state:
                type: string
              message:
                type: string
    Operation:
      type: object
      properties:
        name:
          type: string
        metadata:
          type: object
        done:
          type: boolean
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
        response:
          type: object
    ListRevisionsResponse:
      type: object
      properties:
        revisions:
          type: array
          items:
            $ref: '#/components/schemas/Revision'
        nextPageToken:
          type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/cloud-platform: Full access to Google Cloud Platform
            https://www.googleapis.com/auth/run: View and manage Cloud Run services
externalDocs:
  description: Google Cloud Run Documentation
  url: https://cloud.google.com/run/docs/reference/rest