Apigee API Versions API

Manage API version records

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

apigee-api-versions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Apigee API Hub Analytics API Versions API
  description: API for cataloging, organizing, and governing APIs across an organization. Enables API discovery, metadata management, dependency mapping, deployment tracking, and AI-powered specification boost.
  version: 1.0.0
  contact:
    name: Google Cloud Apigee
    url: https://cloud.google.com/apigee/docs/apihub/what-is-api-hub
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  termsOfService: https://cloud.google.com/terms
servers:
- url: https://apihub.googleapis.com/v1
  description: Apigee API Hub Production Server
security:
- oauth2: []
tags:
- name: API Versions
  description: Manage API version records
paths:
  /projects/{projectId}/locations/{locationId}/apis/{apiId}/versions:
    get:
      operationId: listApiVersions
      summary: Apigee List API Versions
      description: Lists all versions of an API in the registry.
      tags:
      - API Versions
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/locationId'
      - $ref: '#/components/parameters/apiId'
      - $ref: '#/components/parameters/pageSize'
      - $ref: '#/components/parameters/pageToken'
      - name: filter
        in: query
        description: Filter expression.
        schema:
          type: string
      - name: orderBy
        in: query
        description: Field to order results by.
        schema:
          type: string
      responses:
        '200':
          description: Successful response with list of API versions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListApiVersionsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    post:
      operationId: createApiVersion
      summary: Apigee Create an API Version
      description: Creates a new version for an API in the registry.
      tags:
      - API Versions
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/locationId'
      - $ref: '#/components/parameters/apiId'
      - name: apiVersionId
        in: query
        description: Required. The ID to use for the version.
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiVersion'
      responses:
        '200':
          description: Successful response with the created version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiVersion'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /projects/{projectId}/locations/{locationId}/apis/{apiId}/versions/{versionId}:
    get:
      operationId: getApiVersion
      summary: Apigee Get an API Version
      description: Gets the details of a specific API version.
      tags:
      - API Versions
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/locationId'
      - $ref: '#/components/parameters/apiId'
      - $ref: '#/components/parameters/versionId'
      responses:
        '200':
          description: Successful response with version details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiVersion'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateApiVersion
      summary: Apigee Update an API Version
      description: Updates an existing API version.
      tags:
      - API Versions
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/locationId'
      - $ref: '#/components/parameters/apiId'
      - $ref: '#/components/parameters/versionId'
      - name: updateMask
        in: query
        description: Required. Comma-separated list of fields to update.
        required: true
        schema:
          type: string
      - name: allowMissing
        in: query
        description: If true, create if it does not exist.
        schema:
          type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiVersion'
      responses:
        '200':
          description: Successful response with updated version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiVersion'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteApiVersion
      summary: Apigee Delete an API Version
      description: Deletes an API version and all its owned resources.
      tags:
      - API Versions
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/locationId'
      - $ref: '#/components/parameters/apiId'
      - $ref: '#/components/parameters/versionId'
      - name: force
        in: query
        description: If true, delete child resources as well.
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response confirming deletion
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    locationId:
      name: locationId
      in: path
      description: Google Cloud region or location.
      required: true
      schema:
        type: string
    versionId:
      name: versionId
      in: path
      description: ID of the API version.
      required: true
      schema:
        type: string
    pageToken:
      name: pageToken
      in: query
      description: Page token returned from a previous list request.
      schema:
        type: string
    apiId:
      name: apiId
      in: path
      description: ID of the API resource.
      required: true
      schema:
        type: string
    pageSize:
      name: pageSize
      in: query
      description: Maximum number of items to return per page.
      schema:
        type: integer
        format: int32
    projectId:
      name: projectId
      in: path
      description: Google Cloud project ID.
      required: true
      schema:
        type: string
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              format: int32
            message:
              type: string
            status:
              type: string
    ListApiVersionsResponse:
      type: object
      properties:
        apiVersions:
          type: array
          items:
            $ref: '#/components/schemas/ApiVersion'
        nextPageToken:
          type: string
    ApiVersion:
      type: object
      description: A version of an API.
      properties:
        name:
          type: string
          description: Resource name of the version.
        displayName:
          type: string
          description: Human-readable display name.
        description:
          type: string
          description: Description of the version.
        state:
          type: string
          description: Lifecycle state of the version.
        labels:
          type: object
          description: User-defined labels.
          additionalProperties:
            type: string
        annotations:
          type: object
          description: User-defined annotations.
          additionalProperties:
            type: string
        createTime:
          type: string
          format: date-time
          description: Output only. Creation time.
          readOnly: true
        updateTime:
          type: string
          format: date-time
          description: Output only. Last update time.
          readOnly: true
  responses:
    Forbidden:
      description: Forbidden. The caller does not have permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized. Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request. The request body or parameters are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not found. The specified resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2:
      type: oauth2
      description: Google OAuth 2.0 authentication
      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 resources
externalDocs:
  description: Apigee API Hub API Reference Documentation
  url: https://cloud.google.com/apigee/docs/reference/apis/apihub/rest