Apigee API Observations API

View and manage discovered API observations

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

apigee-api-observations-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Apigee API Hub Analytics API Observations 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 Observations
  description: View and manage discovered API observations
paths:
  /projects/{projectId}/locations/{locationId}/observationJobs/{observationJobId}/apiObservations:
    get:
      operationId: listApiObservations
      summary: Apigee List API Observations
      description: Lists all API observations discovered by the specified observation job. Each observation represents a shadow API endpoint detected through traffic analysis.
      tags:
      - API Observations
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/locationId'
      - $ref: '#/components/parameters/observationJobId'
      - $ref: '#/components/parameters/pageSize'
      - $ref: '#/components/parameters/pageToken'
      responses:
        '200':
          description: Successful response with list of API observations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListApiObservationsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /projects/{projectId}/locations/{locationId}/observationJobs/{observationJobId}/apiObservations/{apiObservationId}:
    get:
      operationId: getApiObservation
      summary: Apigee Get an API Observation
      description: Gets details for a specific API observation, including the discovered hostname, server IPs, request count, and last seen time.
      tags:
      - API Observations
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/locationId'
      - $ref: '#/components/parameters/observationJobId'
      - $ref: '#/components/parameters/apiObservationId'
      responses:
        '200':
          description: Successful response with API observation details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiObservation'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /projects/{projectId}/locations/{locationId}/observationJobs/{observationJobId}/apiObservations:batchEditTags:
    post:
      operationId: batchEditApiObservationTags
      summary: Apigee Batch Edit API Observation Tags
      description: Updates tags on multiple API observations in a single batch operation. Tags help categorize and organize discovered APIs.
      tags:
      - API Observations
      parameters:
      - $ref: '#/components/parameters/projectId'
      - $ref: '#/components/parameters/locationId'
      - $ref: '#/components/parameters/observationJobId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchEditTagsRequest'
      responses:
        '200':
          description: Successful response with updated observations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchEditTagsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    locationId:
      name: locationId
      in: path
      description: Google Cloud region or location.
      required: true
      schema:
        type: string
    apiObservationId:
      name: apiObservationId
      in: path
      description: ID of the API observation.
      required: true
      schema:
        type: string
    pageSize:
      name: pageSize
      in: query
      description: Maximum number of items to return per page.
      schema:
        type: integer
        format: int32
    pageToken:
      name: pageToken
      in: query
      description: Page token returned from a previous list request.
      schema:
        type: string
    observationJobId:
      name: observationJobId
      in: path
      description: ID of the observation job.
      required: true
      schema:
        type: string
    projectId:
      name: projectId
      in: path
      description: Google Cloud project ID.
      required: true
      schema:
        type: string
  schemas:
    ApiObservation:
      type: object
      description: A discovered shadow API from traffic observation.
      properties:
        name:
          type: string
          description: Output only. Resource name of the observation.
          readOnly: true
        hostname:
          type: string
          description: Hostname of the discovered API.
        serverIps:
          type: array
          description: Server IP addresses serving the API.
          items:
            type: string
        sourceLocations:
          type: array
          description: Locations where the API was observed.
          items:
            type: string
        apiOperationCount:
          type: string
          format: int64
          description: Number of operations discovered in this API.
        requestCount:
          type: string
          format: int64
          description: Total number of requests observed.
        lastEventDetectedTime:
          type: string
          format: date-time
          description: Time of the last observed event.
        firstEventDetectedTime:
          type: string
          format: date-time
          description: Time of the first observed event.
        style:
          type: string
          description: Inferred API style.
          enum:
          - STYLE_UNSPECIFIED
          - REST
          - GRPC
          - GRAPHQL
        tags:
          type: array
          description: User-defined tags for the observation.
          items:
            type: string
        createTime:
          type: string
          format: date-time
          description: Output only. Time the observation was created.
          readOnly: true
        updateTime:
          type: string
          format: date-time
          description: Output only. Time the observation was last updated.
          readOnly: true
    BatchEditTagsResponse:
      type: object
      description: Response from batch editing tags.
      properties:
        apiObservations:
          type: array
          items:
            $ref: '#/components/schemas/ApiObservation'
    Error:
      type: object
      description: Error response.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              format: int32
            message:
              type: string
            status:
              type: string
    BatchEditTagsRequest:
      type: object
      description: Request for batch editing tags on API observations.
      properties:
        requests:
          type: array
          description: List of tag edit requests.
          items:
            type: object
            properties:
              apiObservationId:
                type: string
              tagActions:
                type: array
                items:
                  type: object
                  properties:
                    tag:
                      type: string
                    action:
                      type: string
                      enum:
                      - ACTION_UNSPECIFIED
                      - ADD
                      - REMOVE
    ListApiObservationsResponse:
      type: object
      properties:
        apiObservations:
          type: array
          items:
            $ref: '#/components/schemas/ApiObservation'
        nextPageToken:
          type: string
  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