Resource: ApiOperation
Represents an operation contained in an API version in the API Hub. An operation is added/updated/deleted in an API version when a new spec is added or an existing spec is updated/deleted in a version. Currently, an operation will be created only corresponding to OpenAPI spec as parsing is supported for OpenAPI spec. Alternatively operations can be managed via create,update and delete APIs, creation of apiOperation can be possible only for version with no parsed operations and update/delete can be possible only for operations created via create API.
| JSON representation |
|---|
{ "name": string, "spec": string, "details": { object ( |
| Fields | |
|---|---|
name |
Identifier. The name of the operation. Format: |
spec |
Output only. The name of the spec will be of the format: |
details |
Optional. Operation details. Note: Even though this field is optional, it is required for |
createTime |
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: |
updateTime |
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: |
attributes |
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: An object containing a list of |
sourceMetadata[] |
Output only. The list of sources and metadata from the sources of the API operation. |
OperationDetails
The operation details parsed from the spec.
| JSON representation |
|---|
{ "description": string, "documentation": { object ( |
| Fields | |
|---|---|
description |
Optional. Description of the operation behavior. For OpenAPI spec, this will map to |
documentation |
Optional. Additional external documentation for this operation. For OpenAPI spec, this will map to |
deprecated |
Optional. For OpenAPI spec, this will be set if |
Union field
|
|
httpOperation |
The HTTP Operation. |
mcpTool |
The MCP Tool Operation. |
McpTool
Details describing an MCP Tool.
| JSON representation |
|---|
{ "name": string, "title": string, "description": string, "annotations": { object ( |
| Fields | |
|---|---|
name |
Required. The name of the tool, unique within its parent scope (version). |
title |
Optional. Optional title for the tool. |
description |
Optional. Description of what the tool does. |
annotations |
Optional. Optional annotations for the tool. |
inputSchema |
Optional. Input schema for the operation. This can be parsed only from MCP schema type. |
outputSchema |
Optional. Output schema for the operation. This can be parsed only from MCP schema type. |
ToolAnnotations
Annotations for a Tool.
| JSON representation |
|---|
{ "title": string, "additionalHints": { string: string, ... }, "readOnlyHint": boolean, "destructiveHint": boolean, "idempotentHint": boolean, "openWorldHint": boolean } |
| Fields | |
|---|---|
title |
Optional. A human-readable title for the tool (if different from Tool.title). |
additionalHints |
Optional. Additional hints which may help tools and not covered in defaults. An object containing a list of |
readOnlyHint |
Optional. Hint indicating if the tool is read-only. |
destructiveHint |
Optional. Hint indicating if the tool may have destructive side effects. |
idempotentHint |
Optional. Hint indicating if the tool is idempotent. |
openWorldHint |
Optional. Hint indicating if the tool interacts with the open world (e.g., internet). |
OperationSchema
The operation schema needed for an operation.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field value. The value of the schema. value can be only one of the following: |
|
jsonSchema |
The JSON schema. Only valid JSON is accepted but semantic validation of schema is not supported right now. |
Methods |
|
|---|---|
|
Create an apiOperation in an API version. |
|
Delete an operation in an API version and we can delete only the operations created via create API. |
|
Get details about a particular operation in API version. |
|
List operations in an API version. |
|
Update an operation in an API version. |