MCP Tools Reference: apihub.googleapis.com

Tool: search_resources

Search resources in API hub

The following sample demonstrate how to use curl to invoke the search_resources MCP tool.

Curl Request
                  
curl --location 'https://apihub.REGION.rep.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "search_resources",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Where, REGION is the supported API hub region. For more information, see Supported regions.

Input Schema

The SearchResources method's request.

SearchResourcesRequest

JSON representation
{
  "location": string,
  "query": string,
  "filter": string,
  "pageSize": integer,
  "pageToken": string
}
Fields
location

string

Required. The resource name of the location which will be of the type projects/{project_id}/locations/{location_id}. This field is used to identify the instance of API-Hub in which resources should be searched.

query

string

Required. The free text search query. This query can contain keywords which could be related to any detail of the API-Hub resources such display names, descriptions, attributes etc.

filter

string

Optional. An expression that filters the list of search results.

A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be =. Filters are not case sensitive.

The following field names are eligible for filtering: * resource_type - The type of resource in the search results. Must be one of the following: Api, ApiOperation, Deployment, Definition, Spec or Version. This field can only be specified once in the filter.

Here are is an example:

  • resource_type = Api - The resource_type is Api.
pageSize

integer

Optional. The maximum number of search results to return. The service may return fewer than this value. If unspecified at most 10 search results will be returned. If value is negative then INVALID_ARGUMENT error is returned. The maximum value is 25; values above 25 will be coerced to 25. While paginating, you can specify a new page size parameter for each page of search results to be listed.

pageToken

string

Optional. A page token, received from a previous [SearchResources][SearchResources] call. Specify this parameter to retrieve the next page of transactions.

When paginating, you must specify the page_token parameter and all the other parameters except page_size should be specified with the same value which was used in the previous call. If the other fields are set with a different value than the previous call then INVALID_ARGUMENT error is returned.

Output Schema

Response for the SearchResources method.

SearchResourcesResponse

JSON representation
{
  "searchResults": [
    {
      object (SearchResult)
    }
  ],
  "nextPageToken": string
}
Fields
searchResults[]

object (SearchResult)

List of search results according to the filter and search query specified. The order of search results represents the ranking.

nextPageToken

string

Pass this token in the SearchResourcesRequest to continue to list results. If all results have been returned, this field is an empty string or not present in the response.

SearchResult

JSON representation
{
  "resource": {
    object (ApiHubResource)
  }
}
Fields
resource

object (ApiHubResource)

This represents the ApiHubResource. Note: Only selected fields of the resources are populated in response.

ApiHubResource

JSON representation
{

  // Union field resource can be only one of the following:
  "api": {
    object (Api)
  },
  "operation": {
    object (ApiOperation)
  },
  "deployment": {
    object (Deployment)
  },
  "spec": {
    object (Spec)
  },
  "definition": {
    object (Definition)
  },
  "version": {
    object (Version)
  }
  // End of list of possible types for union field resource.
}
Fields

Union field resource.

resource can be only one of the following:

api

object (Api)

This represents Api resource in search results. Only name, display_name, description and owner fields are populated in search results.

operation

object (ApiOperation)

This represents ApiOperation resource in search results. Only name, description, spec and details fields are populated in search results.

deployment

object (Deployment)

This represents Deployment resource in search results. Only name, display_name, description, deployment_type and api_versions fields are populated in search results.

spec

object (Spec)

This represents Spec resource in search results. Only name, display_name, description, spec_type and documentation fields are populated in search results.

definition

object (Definition)

This represents Definition resource in search results. Only name field is populated in search results.

version

object (Version)

This represents Version resource in search results. Only name, display_name, description, lifecycle, compliance and accreditation fields are populated in search results.

Api

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,
  "documentation": {
    object (Documentation)
  },
  "owner": {
    object (Owner)
  },
  "versions": [
    string
  ],
  "createTime": string,
  "updateTime": string,
  "targetUser": {
    object (AttributeValues)
  },
  "team": {
    object (AttributeValues)
  },
  "businessUnit": {
    object (AttributeValues)
  },
  "maturityLevel": {
    object (AttributeValues)
  },
  "attributes": {
    string: {
      object (AttributeValues)
    },
    ...
  },
  "apiStyle": {
    object (AttributeValues)
  },
  "selectedVersion": string,
  "apiRequirements": {
    object (AttributeValues)
  },
  "fingerprint": string,
  "sourceMetadata": [
    {
      object (SourceMetadata)
    }
  ],
  "apiFunctionalRequirements": {
    object (AttributeValues)
  },
  "apiTechnicalRequirements": {
    object (AttributeValues)
  }
}
Fields
name

string

Identifier. The name of the API resource in the API Hub.

Format: projects/{project}/locations/{location}/apis/{api}

displayName

string

Required. The display name of the API resource.

description

string

Optional. The description of the API resource.

documentation

object (Documentation)

Optional. The documentation for the API resource.

owner

object (Owner)

Optional. Owner details for the API resource.

versions[]

string

Output only. The list of versions present in an API resource. Note: An API resource can be associated with more than 1 version. Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}

createTime

string (Timestamp format)

Output only. The time at which the API resource was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The time at which the API resource was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

targetUser

object (AttributeValues)

Optional. The target users for the API. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-target-user attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

team

object (AttributeValues)

Optional. The team owning the API. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-team attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

businessUnit

object (AttributeValues)

Optional. The business unit owning the API. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-business-unit attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

maturityLevel

object (AttributeValues)

Optional. The maturity level of the API. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-maturity-level attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

attributes

map (key: string, value: object (AttributeValues))

Optional. The list of user defined attributes associated with the API resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute}. The value is the attribute values associated with the resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

apiStyle

object (AttributeValues)

Optional. The style of the API. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-api-style attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

selectedVersion

string

Optional. The selected version for an API resource. This can be used when special handling is needed on client side for particular version of the API. Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}

apiRequirements

object (AttributeValues)

Optional. The api requirement doc associated with the API resource. Carinality is 1 for this attribute. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-api-requirements attribute. The value of the attribute should be a proper URI, and in case of Cloud Storage URI, it should point to a Cloud Storage object, not a directory.

fingerprint

string

Optional. Fingerprint of the API resource. This must be unique for each API resource. It can neither be unset nor be updated to an existing fingerprint of another API resource.

sourceMetadata[]

object (SourceMetadata)

Output only. The list of sources and metadata from the sources of the API resource.

apiFunctionalRequirements

object (AttributeValues)

Optional. The api functional requirements associated with the API resource. Carinality is 1 for this attribute. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-api-functional-requirements attribute. The value of the attribute should be a proper URI, and in case of Cloud Storage URI, it should point to a Cloud Storage object, not a directory.

apiTechnicalRequirements

object (AttributeValues)

Optional. The api technical requirements associated with the API resource. Carinality is 1 for this attribute. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-api-technical-requirements attribute. The value of the attribute should be a proper URI, and in case of Cloud Storage URI, it should point to a Cloud Storage object, not a directory.

Documentation

JSON representation
{
  "externalUri": string
}
Fields
externalUri

string

Optional. The uri of the externally hosted documentation.

Owner

JSON representation
{
  "displayName": string,
  "email": string
}
Fields
displayName

string

Optional. The name of the owner.

email

string

Required. The email of the owner.

Timestamp

JSON representation
{
  "seconds": string,
  "nanos": integer
}
Fields
seconds

string (int64 format)

Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).

nanos

integer

Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive.

AttributeValues

JSON representation
{
  "attribute": string,

  // Union field Value can be only one of the following:
  "enumValues": {
    object (EnumAttributeValues)
  },
  "stringValues": {
    object (StringAttributeValues)
  },
  "jsonValues": {
    object (StringAttributeValues)
  },
  "uriValues": {
    object (StringAttributeValues)
  }
  // End of list of possible types for union field Value.
}
Fields
attribute

string

Output only. The name of the attribute. Format: projects/{project}/locations/{location}/attributes/{attribute}

Union field Value. The attribute values associated with the resource. Value can be only one of the following:
enumValues

object (EnumAttributeValues)

The attribute values associated with a resource in case attribute data type is enum.

stringValues

object (StringAttributeValues)

The attribute values associated with a resource in case attribute data type is string.

jsonValues

object (StringAttributeValues)

The attribute values associated with a resource in case attribute data type is JSON.

uriValues

object (StringAttributeValues)

The attribute values associated with a resource in case attribute data type is URL, URI or IP, like gs://bucket-name/object-name.

EnumAttributeValues

JSON representation
{
  "values": [
    {
      object (AllowedValue)
    }
  ]
}
Fields
values[]

object (AllowedValue)

Required. The attribute values in case attribute data type is enum.

AllowedValue

JSON representation
{
  "id": string,
  "displayName": string,
  "description": string,
  "immutable": boolean
}
Fields
id

string

Required. The ID of the allowed value. * If provided, the same will be used. The service will throw an error if the specified id is already used by another allowed value in the same attribute resource. * If not provided, a system generated id derived from the display name will be used. In this case, the service will handle conflict resolution by adding a system generated suffix in case of duplicates.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

displayName

string

Required. The display name of the allowed value.

description

string

Optional. The detailed description of the allowed value.

immutable

boolean

Optional. When set to true, the allowed value cannot be updated or deleted by the user. It can only be true for System defined attributes.

StringAttributeValues

JSON representation
{
  "values": [
    string
  ]
}
Fields
values[]

string

Required. The attribute values in case attribute data type is string or JSON.

AttributesEntry

JSON representation
{
  "key": string,
  "value": {
    object (AttributeValues)
  }
}
Fields
key

string

value

object (AttributeValues)

SourceMetadata

JSON representation
{
  "sourceType": enum (SourceType),
  "originalResourceId": string,
  "originalResourceCreateTime": string,
  "originalResourceUpdateTime": string,

  // Union field source can be only one of the following:
  "pluginInstanceActionSource": {
    object (PluginInstanceActionSource)
  }
  // End of list of possible types for union field source.
}
Fields
sourceType

enum (SourceType)

Output only. The type of the source.

originalResourceId

string

Output only. The unique identifier of the resource at the source.

originalResourceCreateTime

string (Timestamp format)

Output only. The time at which the resource was created at the source.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

originalResourceUpdateTime

string (Timestamp format)

Output only. The time at which the resource was last updated at the source.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Union field source. The source of the resource. source can be only one of the following:
pluginInstanceActionSource

object (PluginInstanceActionSource)

Output only. The source of the resource is a plugin instance action.

PluginInstanceActionSource

JSON representation
{
  "pluginInstance": string,
  "actionId": string
}
Fields
pluginInstance

string

Output only. The resource name of the source plugin instance. Format is projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}

actionId

string

Output only. The id of the plugin instance action.

ApiOperation

JSON representation
{
  "name": string,
  "spec": string,
  "details": {
    object (OperationDetails)
  },
  "createTime": string,
  "updateTime": string,
  "attributes": {
    string: {
      object (AttributeValues)
    },
    ...
  },
  "sourceMetadata": [
    {
      object (SourceMetadata)
    }
  ]
}
Fields
name

string

Identifier. The name of the operation.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}

spec

string

Output only. The name of the spec will be of the format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec} Note:The name of the spec will be empty if the operation is created via CreateApiOperation API.

details

object (OperationDetails)

Optional. Operation details. Note: Even though this field is optional, it is required for CreateApiOperation API and we will fail the request if not provided.

createTime

string (Timestamp format)

Output only. The time at which the operation was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The time at which the operation was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

attributes

map (key: string, value: object (AttributeValues))

Optional. The list of user defined attributes associated with the API operation resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute}. The value is the attribute values associated with the resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

sourceMetadata[]

object (SourceMetadata)

Output only. The list of sources and metadata from the sources of the API operation.

OperationDetails

JSON representation
{
  "description": string,
  "documentation": {
    object (Documentation)
  },
  "deprecated": boolean,

  // Union field operation can be only one of the following:
  "httpOperation": {
    object (HttpOperation)
  },
  "mcpTool": {
    object (McpTool)
  }
  // End of list of possible types for union field operation.
}
Fields
description

string

Optional. Description of the operation behavior. For OpenAPI spec, this will map to operation.description in the spec, in case description is empty, operation.summary will be used.

documentation

object (Documentation)

Optional. Additional external documentation for this operation. For OpenAPI spec, this will map to operation.documentation in the spec.

deprecated

boolean

Optional. For OpenAPI spec, this will be set if operation.deprecatedis marked as true in the spec.

Union field operation.

operation can be only one of the following:

httpOperation

object (HttpOperation)

The HTTP Operation.

mcpTool

object (McpTool)

The MCP Tool Operation.

HttpOperation

JSON representation
{
  "path": {
    object (Path)
  },
  "method": enum (Method)
}
Fields
path

object (Path)

Optional. The path details for the Operation. Note: Even though this field is optional, it is required for CreateApiOperation API and we will fail the request if not provided.

method

enum (Method)

Optional. Operation method Note: Even though this field is optional, it is required for CreateApiOperation API and we will fail the request if not provided.

Path

JSON representation
{
  "path": string,
  "description": string
}
Fields
path

string

Optional. Complete path relative to server endpoint. Note: Even though this field is optional, it is required for CreateApiOperation API and we will fail the request if not provided.

description

string

Optional. A short description for the path applicable to all operations.

McpTool

JSON representation
{
  "name": string,
  "title": string,
  "description": string,
  "annotations": {
    object (ToolAnnotations)
  },
  "inputSchema": {
    object (OperationSchema)
  },
  "outputSchema": {
    object (OperationSchema)
  }
}
Fields
name

string

Required. The name of the tool, unique within its parent scope (version).

title

string

Optional. Optional title for the tool.

description

string

Optional. Description of what the tool does.

annotations

object (ToolAnnotations)

Optional. Optional annotations for the tool.

inputSchema

object (OperationSchema)

Optional. Input schema for the operation. This can be parsed only from MCP schema type.

outputSchema

object (OperationSchema)

Optional. Output schema for the operation. This can be parsed only from MCP schema type.

ToolAnnotations

JSON representation
{
  "title": string,
  "additionalHints": {
    string: string,
    ...
  },

  // Union field _read_only_hint can be only one of the following:
  "readOnlyHint": boolean
  // End of list of possible types for union field _read_only_hint.

  // Union field _destructive_hint can be only one of the following:
  "destructiveHint": boolean
  // End of list of possible types for union field _destructive_hint.

  // Union field _idempotent_hint can be only one of the following:
  "idempotentHint": boolean
  // End of list of possible types for union field _idempotent_hint.

  // Union field _open_world_hint can be only one of the following:
  "openWorldHint": boolean
  // End of list of possible types for union field _open_world_hint.
}
Fields
title

string

Optional. A human-readable title for the tool (if different from Tool.title).

additionalHints

map (key: string, value: string)

Optional. Additional hints which may help tools and not covered in defaults.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Union field _read_only_hint.

_read_only_hint can be only one of the following:

readOnlyHint

boolean

Optional. Hint indicating if the tool is read-only.

Union field _destructive_hint.

_destructive_hint can be only one of the following:

destructiveHint

boolean

Optional. Hint indicating if the tool may have destructive side effects.

Union field _idempotent_hint.

_idempotent_hint can be only one of the following:

idempotentHint

boolean

Optional. Hint indicating if the tool is idempotent.

Union field _open_world_hint.

_open_world_hint can be only one of the following:

openWorldHint

boolean

Optional. Hint indicating if the tool interacts with the open world (e.g., internet).

AdditionalHintsEntry

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

value

string

OperationSchema

JSON representation
{

  // Union field value can be only one of the following:
  "jsonSchema": {
    object
  }
  // End of list of possible types for union field value.
}
Fields
Union field value. The value of the schema. value can be only one of the following:
jsonSchema

object (Struct format)

The JSON schema. Only valid JSON is accepted but semantic validation of schema is not supported right now.

Struct

JSON representation
{
  "fields": {
    string: value,
    ...
  }
}
Fields
fields

map (key: string, value: value (Value format))

Unordered map of dynamically typed values.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

FieldsEntry

JSON representation
{
  "key": string,
  "value": value
}
Fields
key

string

value

value (Value format)

Value

JSON representation
{

  // Union field kind can be only one of the following:
  "nullValue": null,
  "numberValue": number,
  "stringValue": string,
  "boolValue": boolean,
  "structValue": {
    object
  },
  "listValue": array
  // End of list of possible types for union field kind.
}
Fields
Union field kind. The kind of value. kind can be only one of the following:
nullValue

null

Represents a JSON null.

numberValue

number

Represents a JSON number. Must not be NaN, Infinity or -Infinity, since those are not supported in JSON. This also cannot represent large Int64 values, since JSON format generally does not support them in its number type.

stringValue

string

Represents a JSON string.

boolValue

boolean

Represents a JSON boolean (true or false literal in JSON).

structValue

object (Struct format)

Represents a JSON object.

listValue

array (ListValue format)

Represents a JSON array.

ListValue

JSON representation
{
  "values": [
    value
  ]
}
Fields
values[]

value (Value format)

Repeated field of dynamically typed values.

AttributesEntry

JSON representation
{
  "key": string,
  "value": {
    object (AttributeValues)
  }
}
Fields
key

string

value

object (AttributeValues)

Deployment

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,
  "documentation": {
    object (Documentation)
  },
  "deploymentType": {
    object (AttributeValues)
  },
  "resourceUri": string,
  "endpoints": [
    string
  ],
  "apiVersions": [
    string
  ],
  "createTime": string,
  "updateTime": string,
  "slo": {
    object (AttributeValues)
  },
  "environment": {
    object (AttributeValues)
  },
  "attributes": {
    string: {
      object (AttributeValues)
    },
    ...
  },
  "sourceMetadata": [
    {
      object (SourceMetadata)
    }
  ],
  "managementUrl": {
    object (AttributeValues)
  },
  "sourceUri": {
    object (AttributeValues)
  },
  "sourceProject": string,
  "sourceEnvironment": string
}
Fields
name

string

Identifier. The name of the deployment.

Format: projects/{project}/locations/{location}/deployments/{deployment}

displayName

string

Required. The display name of the deployment.

description

string

Optional. The description of the deployment.

documentation

object (Documentation)

Optional. The documentation of the deployment.

deploymentType

object (AttributeValues)

Required. The type of deployment. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-deployment-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

resourceUri

string

Required. The resource URI identifies the deployment within its gateway. For Apigee gateways, its recommended to use the format: organizations/{org}/environments/{env}/apis/{api}. For ex: if a proxy with name orders is deployed in staging environment of cymbal organization, the resource URI would be: organizations/cymbal/environments/staging/apis/orders.

endpoints[]

string

Required. The endpoints at which this deployment resource is listening for API requests. This could be a list of complete URIs, hostnames or an IP addresses.

apiVersions[]

string

Output only. The API versions linked to this deployment. Note: A particular deployment could be linked to multiple different API versions (of same or different APIs).

createTime

string (Timestamp format)

Output only. The time at which the deployment was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The time at which the deployment was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

slo

object (AttributeValues)

Optional. The SLO for this deployment. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-slo attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

environment

object (AttributeValues)

Optional. The environment mapping to this deployment. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-environment attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

attributes

map (key: string, value: object (AttributeValues))

Optional. The list of user defined attributes associated with the deployment resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute}. The value is the attribute values associated with the resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

sourceMetadata[]

object (SourceMetadata)

Output only. The list of sources and metadata from the sources of the deployment.

managementUrl

object (AttributeValues)

Optional. The uri where users can navigate to for the management of the deployment. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-management-url The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. The value of the attribute should be a valid URL.

sourceUri

object (AttributeValues)

Optional. The uri where additional source specific information for this deployment can be found. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-source-uri The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. The value of the attribute should be a valid URI, and in case of Cloud Storage URI, it should point to a Cloud Storage object, not a directory.

sourceProject

string

Optional. The project to which the deployment belongs. For Google Cloud gateways, this will refer to the project identifier. For others like Edge/OPDK, this will refer to the org identifier.

sourceEnvironment

string

Optional. The environment at source for the deployment. For example: prod, dev, staging, etc.

AttributesEntry

JSON representation
{
  "key": string,
  "value": {
    object (AttributeValues)
  }
}
Fields
key

string

value

object (AttributeValues)

Spec

JSON representation
{
  "name": string,
  "displayName": string,
  "specType": {
    object (AttributeValues)
  },
  "contents": {
    object (SpecContents)
  },
  "details": {
    object (SpecDetails)
  },
  "sourceUri": string,
  "createTime": string,
  "updateTime": string,
  "lintResponse": {
    object (LintResponse)
  },
  "attributes": {
    string: {
      object (AttributeValues)
    },
    ...
  },
  "documentation": {
    object (Documentation)
  },
  "parsingMode": enum (ParsingMode),
  "sourceMetadata": [
    {
      object (SourceMetadata)
    }
  ],
  "additionalSpecContents": [
    {
      object (AdditionalSpecContent)
    }
  ]
}
Fields
name

string

Identifier. The name of the spec.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

displayName

string

Required. The display name of the spec. This can contain the file name of the spec.

specType

object (AttributeValues)

Required. The type of spec. The value should be one of the allowed values defined for projects/{project}/locations/{location}/attributes/system-spec-type attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.

Note, this field is mandatory if content is provided.

contents

object (SpecContents)

Optional. Input only. The contents of the uploaded spec.

details

object (SpecDetails)

Output only. Details parsed from the spec.

sourceUri

string

Optional. The URI of the spec source in case file is uploaded from an external version control system.

createTime

string (Timestamp format)

Output only. The time at which the spec was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The time at which the spec was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

lintResponse

object (LintResponse)

Optional. The lint response for the spec.

attributes

map (key: string, value: object (AttributeValues))

Optional. The list of user defined attributes associated with the spec. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute}. The value is the attribute values associated with the resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

documentation

object (Documentation)

Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

parsingMode

enum (ParsingMode)

Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

sourceMetadata[]

object (SourceMetadata)

Output only. The list of sources and metadata from the sources of the spec.

additionalSpecContents[]

object (AdditionalSpecContent)

Output only. The additional spec contents for the spec.

SpecContents

JSON representation
{
  "contents": string,
  "mimeType": string
}
Fields
contents

string (bytes format)

Required. The contents of the spec.

A base64-encoded string.

mimeType

string

Required. The mime type of the content for example application/json, application/yaml, application/wsdl etc.

SpecDetails

JSON representation
{
  "description": string,

  // Union field details can be only one of the following:
  "openApiSpecDetails": {
    object (OpenApiSpecDetails)
  }
  // End of list of possible types for union field details.
}
Fields
description

string

Output only. The description of the spec.

Union field details.

details can be only one of the following:

openApiSpecDetails

object (OpenApiSpecDetails)

Output only. Additional details apart from OperationDetails parsed from an OpenAPI spec. The OperationDetails parsed from the spec can be obtained by using ListAPIOperations method.

OpenApiSpecDetails

JSON representation
{
  "format": enum (Format),
  "version": string,
  "owner": {
    object (Owner)
  }
}
Fields
format

enum (Format)

Output only. The format of the spec.

version

string

Output only. The version in the spec. This maps to info.version in OpenAPI spec.

owner

object (Owner)

Output only. Owner details for the spec. This maps to info.contact in OpenAPI spec.

LintResponse

JSON representation
{
  "issues": [
    {
      object (Issue)
    }
  ],
  "summary": [
    {
      object (SummaryEntry)
    }
  ],
  "state": enum (LintState),
  "source": string,
  "linter": enum (Linter),
  "createTime": string
}
Fields
issues[]

object (Issue)

Optional. Array of issues found in the analyzed document.

summary[]

object (SummaryEntry)

Optional. Summary of all issue types and counts for each severity level.

state

enum (LintState)

Required. Lint state represents success or failure for linting.

source

string

Required. Name of the linting application.

linter

enum (Linter)

Required. Name of the linter used.

createTime

string (Timestamp format)

Required. Timestamp when the linting response was generated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Issue

JSON representation
{
  "code": string,
  "path": [
    string
  ],
  "message": string,
  "severity": enum (Severity),
  "range": {
    object (Range)
  }
}
Fields
code

string

Required. Rule code unique to each rule defined in linter.

path[]

string

Required. An array of strings indicating the location in the analyzed document where the rule was triggered.

message

string

Required. Human-readable message describing the issue found by the linter.

severity

enum (Severity)

Required. Severity level of the rule violation.

range

object (Range)

Required. Object describing where in the file the issue was found.

Range

JSON representation
{
  "start": {
    object (Point)
  },
  "end": {
    object (Point)
  }
}
Fields
start

object (Point)

Required. Start of the issue.

end

object (Point)

Required. End of the issue.

Point

JSON representation
{
  "line": integer,
  "character": integer
}
Fields
line

integer

Required. Line number (zero-indexed).

character

integer

Required. Character position within the line (zero-indexed).

SummaryEntry

JSON representation
{
  "severity": enum (Severity),
  "count": integer
}
Fields
severity

enum (Severity)

Required. Severity of the issue.

count

integer

Required. Count of issues with the given severity.

AttributesEntry

JSON representation
{
  "key": string,
  "value": {
    object (AttributeValues)
  }
}
Fields
key

string

value

object (AttributeValues)

AdditionalSpecContent

JSON representation
{
  "specContentType": enum (SpecContentType),
  "specContents": {
    object (SpecContents)
  },
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  }
}
Fields
specContentType

enum (SpecContentType)

Required. The type of the spec content.

specContents

object (SpecContents)

Optional. The additional spec contents.

createTime

string (Timestamp format)

Output only. The time at which the spec content was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The time at which the spec content was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

labels

map (key: string, value: string)

Optional. The labels of the spec content e.g. specboost addon version.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

LabelsEntry

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

value

string

Definition

JSON representation
{
  "name": string,
  "spec": string,
  "type": enum (Type),
  "createTime": string,
  "updateTime": string,
  "attributes": {
    string: {
      object (AttributeValues)
    },
    ...
  },

  // Union field value can be only one of the following:
  "schema": {
    object (Schema)
  }
  // End of list of possible types for union field value.
}
Fields
name

string

Identifier. The name of the definition.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}

spec

string

Output only. The name of the spec from where the definition was parsed. Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

type

enum (Type)

Output only. The type of the definition.

createTime

string (Timestamp format)

Output only. The time at which the definition was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The time at which the definition was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

attributes

map (key: string, value: object (AttributeValues))

Optional. The list of user defined attributes associated with the definition resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute}. The value is the attribute values associated with the resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Union field value.

value can be only one of the following:

schema

object (Schema)

Output only. The value of a schema definition.

Schema

JSON representation
{
  "displayName": string,
  "rawValue": string
}
Fields
displayName

string

Output only. The display name of the schema. This will map to the name of the schema in the spec.

rawValue

string (bytes format)

Output only. The raw value of the schema definition corresponding to the schema name in the spec.

A base64-encoded string.

AttributesEntry

JSON representation
{
  "key": string,
  "value": {
    object (AttributeValues)
  }
}
Fields
key

string

value

object (AttributeValues)

Version

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,
  "documentation": {
    object (Documentation)
  },
  "specs": [
    string
  ],
  "apiOperations": [
    string
  ],
  "definitions": [
    string
  ],
  "deployments": [
    string
  ],
  "createTime": string,
  "updateTime": string,
  "lifecycle": {
    object (AttributeValues)
  },
  "compliance": {
    object (AttributeValues)
  },
  "accreditation": {
    object (AttributeValues)
  },
  "attributes": {
    string: {
      object (AttributeValues)
    },
    ...
  },
  "selectedDeployment": string,
  "sourceMetadata": [
    {
      object (SourceMetadata)
    }
  ]
}
Fields
name

string

Identifier. The name of the version.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}

displayName

string

Required. The display name of the version.

description

string

Optional. The description of the version.

documentation

object (Documentation)

Optional. The documentation of the version.

specs[]

string

Output only. The specs associated with this version. Note that an API version can be associated with multiple specs. Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

apiOperations[]

string

Output only. The operations contained in the API version. These operations will be added to the version when a new spec is added or when an existing spec is updated. Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}

definitions[]

string

Output only. The definitions contained in the API version. These definitions will be added to the version when a new spec is added or when an existing spec is updated. Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}

deployments[]

string

Optional. The deployments linked to this API version. Note: A particular API version could be deployed to multiple deployments (for dev deployment, UAT deployment, etc) Format is projects/{project}/locations/{location}/deployments/{deployment}

createTime

string (Timestamp format)

Output only. The time at which the version was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The time at which the version was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

lifecycle

object (AttributeValues)

Optional. The lifecycle of the API version. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-lifecycle attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

compliance

object (AttributeValues)

Optional. The compliance associated with the API version. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-compliance attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

accreditation

object (AttributeValues)

Optional. The accreditations associated with the API version. This maps to the following system defined attribute: projects/{project}/locations/{location}/attributes/system-accreditation attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API. All values should be from the list of allowed values defined for the attribute.

attributes

map (key: string, value: object (AttributeValues))

Optional. The list of user defined attributes associated with the Version resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute}. The value is the attribute values associated with the resource.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

selectedDeployment

string

Optional. The selected deployment for a Version resource. This can be used when special handling is needed on client side for a particular deployment linked to the version. Format is projects/{project}/locations/{location}/deployments/{deployment}

sourceMetadata[]

object (SourceMetadata)

Output only. The list of sources and metadata from the sources of the version.

AttributesEntry

JSON representation
{
  "key": string,
  "value": {
    object (AttributeValues)
  }
}
Fields
key

string

value

object (AttributeValues)

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌