openapi: 3.1.0 info: title: Apigee API Hub Analytics Locations 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: Locations description: Manage project locations and search resources paths: /projects/{projectId}/locations/{locationId}:searchResources: post: operationId: searchResources summary: Apigee Search API Hub Resources description: Searches across all resources in the API Hub including APIs, versions, specs, and deployments. Supports full-text search. tags: - Locations parameters: - $ref: '#/components/parameters/projectId' - $ref: '#/components/parameters/locationId' requestBody: required: true content: application/json: schema: type: object properties: query: type: string description: Required. The search query string. filter: type: string description: Filter expression to narrow the search. pageSize: type: integer format: int32 description: Maximum number of results to return. pageToken: type: string description: Page token from a previous search. responses: '200': description: Successful response with search results content: application/json: schema: $ref: '#/components/schemas/SearchResourcesResponse' '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 projectId: name: projectId in: path description: Google Cloud project ID. required: true schema: type: string schemas: EnumAttributeValue: type: object description: An enum value assigned to an attribute. properties: id: type: string description: ID of the enum value. displayName: type: string description: Output only. Display name of the enum value. readOnly: true Error: type: object description: Error response from the API Hub API. properties: error: type: object properties: code: type: integer format: int32 message: type: string status: type: string AttributeValues: type: object description: Values assigned to an attribute. properties: enumValues: type: object properties: values: type: array items: $ref: '#/components/schemas/EnumAttributeValue' stringValues: type: object properties: values: type: array items: type: string jsonValues: type: object properties: values: type: array items: type: string attribute: type: string description: Resource name of the attribute definition. Documentation: type: object description: Documentation associated with a resource. properties: externalUri: type: string description: URI of external documentation. Owner: type: object description: Owner of an API resource. properties: displayName: type: string description: Display name of the owner. email: type: string format: email description: Email address of the owner. ApiSpec: type: object description: A machine-readable API specification. properties: name: type: string description: Output only. Resource name of the spec. readOnly: true displayName: type: string description: Required. Display name for the spec. description: type: string description: Description of the specification. specType: $ref: '#/components/schemas/AttributeValues' contents: type: object description: The spec contents. properties: contents: type: string format: byte description: The spec content as bytes. mimeType: type: string description: MIME type of the content. documentation: $ref: '#/components/schemas/Documentation' sourceUri: type: string description: URI of the original spec source. parsingMode: type: string description: Parsing mode for the specification. enum: - PARSING_MODE_UNSPECIFIED - RELAXED - STRICT lintResponse: $ref: '#/components/schemas/LintResponse' attributes: type: object description: Custom attributes associated with this spec. additionalProperties: $ref: '#/components/schemas/AttributeValues' createTime: type: string format: date-time description: Output only. Time the spec was created. readOnly: true updateTime: type: string format: date-time description: Output only. Time the spec was last updated. readOnly: true ApiVersion: type: object description: A version of an API. properties: name: type: string description: Output only. Resource name of the version. readOnly: true displayName: type: string description: Required. Display name for the version. description: type: string description: Description of the API version. documentation: $ref: '#/components/schemas/Documentation' specs: type: array description: Output only. Specs associated with this version. readOnly: true items: type: string apiOperations: type: array description: Output only. Operations associated with this version. readOnly: true items: type: string definitions: type: array description: Output only. Definitions associated with this version. readOnly: true items: type: string deployments: type: array description: Output only. Deployments associated with this version. readOnly: true items: type: string lifecycle: $ref: '#/components/schemas/AttributeValues' compliance: $ref: '#/components/schemas/AttributeValues' accreditation: $ref: '#/components/schemas/AttributeValues' attributes: type: object description: Custom attributes associated with this version. additionalProperties: $ref: '#/components/schemas/AttributeValues' createTime: type: string format: date-time description: Output only. Time the version was created. readOnly: true updateTime: type: string format: date-time description: Output only. Time the version was last updated. readOnly: true LintResponse: type: object description: Lint results for an API specification. properties: linter: type: string description: Name of the linter used. state: type: string description: State of the linting process. enum: - STATE_UNSPECIFIED - LINT_PENDING - LINT_COMPLETED - LINT_ERROR issues: type: array description: List of lint issues found. items: type: object properties: code: type: string path: type: array items: type: string message: type: string severity: type: string enum: - SEVERITY_UNSPECIFIED - ERROR - WARNING - INFO - HINT summary: type: array description: Summary of lint results by severity. items: type: object properties: severity: type: string count: type: integer format: int32 Deployment: type: object description: An API deployment record. properties: name: type: string description: Output only. Resource name of the deployment. readOnly: true displayName: type: string description: Required. Display name for the deployment. description: type: string description: Description of the deployment. documentation: $ref: '#/components/schemas/Documentation' deploymentType: $ref: '#/components/schemas/AttributeValues' resourceUri: type: string description: URI of the deployed API resource. endpoints: type: array description: Endpoints where the API is accessible. items: type: string apiVersions: type: array description: API versions deployed. items: type: string slo: $ref: '#/components/schemas/AttributeValues' environment: $ref: '#/components/schemas/AttributeValues' attributes: type: object description: Custom attributes associated with this deployment. additionalProperties: $ref: '#/components/schemas/AttributeValues' createTime: type: string format: date-time description: Output only. Time the deployment was created. readOnly: true updateTime: type: string format: date-time description: Output only. Time the deployment was last updated. readOnly: true SearchResourcesResponse: type: object description: Response for searching API Hub resources. properties: searchResults: type: array items: type: object properties: resource: type: object properties: api: $ref: '#/components/schemas/Api' version: $ref: '#/components/schemas/ApiVersion' spec: $ref: '#/components/schemas/ApiSpec' deployment: $ref: '#/components/schemas/Deployment' nextPageToken: type: string Api: type: object description: An API resource in the API Hub. properties: name: type: string description: Output only. Resource name of the API. readOnly: true displayName: type: string description: Required. Display name for the API. description: type: string description: Description of the API. owner: $ref: '#/components/schemas/Owner' documentation: $ref: '#/components/schemas/Documentation' versions: type: array description: Output only. Versions associated with this API. readOnly: true items: type: string deployments: type: array description: Output only. Deployments associated with this API. readOnly: true items: type: string attributes: type: object description: Custom attributes associated with the API. additionalProperties: $ref: '#/components/schemas/AttributeValues' createTime: type: string format: date-time description: Output only. Time the API was created. readOnly: true updateTime: type: string format: date-time description: Output only. Time the API was last updated. readOnly: true targetUser: $ref: '#/components/schemas/AttributeValues' team: $ref: '#/components/schemas/AttributeValues' businessUnit: $ref: '#/components/schemas/AttributeValues' maturityLevel: $ref: '#/components/schemas/AttributeValues' apiStyle: $ref: '#/components/schemas/AttributeValues' 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' 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