- [HTTP request](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch#body.aspect_1)

Update an operation in an API version. The following fields in the `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ApiOperation` can be updated:

- \[details.description\]\[ApiOperation.details.description\]
- \[details.documentation\]\[ApiOperation.details.documentation\]
- \[details.http_operation.path\]\[ApiOperation.details.http_operation.path.path\]
- \[details.http_operation.method\]\[ApiOperation.details.http_operation.method\]
- \[details.deprecated\]\[ApiOperation.details.deprecated\]
- `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ApiOperation.FIELDS.attributes`
- \[details.mcp_tool.title\]\[ApiOperation.details.mcp_tool.title\]
- \[details.mcp_tool.description\]\[ApiOperation.details.mcp_tool.description\]
- \[details.mcp_tool.input_schema\]\[ApiOperation.details.mcp_tool.input_schema\]
- \[details.mcp_tool.output_schema\]\[ApiOperation.details.mcp_tool.output_schema\]
- \[details.input_schema\]\[ApiOperation.details.input_schema\]
- \[details.output_schema\]\[ApiOperation.details.output_schema\]
- \[details.mcp_tool.annotations.title\]\[ApiOperation.details.mcp_tool.annotations.title\]
- \[details.mcp_tool.annotations.read_only_hint\]\[ApiOperation.details.mcp_tool.annotations.read_only_hint\]
- \[details.mcp_tool.annotations.destructive_hint\]\[ApiOperation.details.mcp_tool.annotations.destructive_hint\]
- \[details.mcp_tool.annotations.idempotent_hint\]\[ApiOperation.details.mcp_tool.annotations.idempotent_hint\]
- \[details.mcp_tool.annotations.open_world_hint\]\[ApiOperation.details.mcp_tool.annotations.open_world_hint\]
- \[details.mcp_tool.annotations.additional_hints\]\[ApiOperation.details.mcp_tool.annotations.additional_hints\]

The `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/patch#body.QUERY_PARAMETERS.update_mask` should be used to specify the fields being updated.

An operation can be updated only if the operation was created via `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations/create#google.cloud.apihub.v1.ApiHub.CreateApiOperation` API. If the operation was created by parsing the spec, then it can be edited by updating the spec.

### HTTP request

`PATCH https://apihub.googleapis.com/v1/{apiOperation.name=projects/*/locations/*/apis/*/versions/*/operations/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `apiOperation.name` | `string` Identifier. The name of the operation. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. The list of fields to update. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ApiOperation`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.operations#ApiOperation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/apihub.readwrite`
- `
  https://www.googleapis.com/auth/cloud-platform`

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `apihub.apiOperations.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).