---
title: "PATCH /v1/projects/{projectsId}/locations/{locationsId}/dependencies/{dependenciesId}"
method: PATCH
path: "/v1/projects/{projectsId}/locations/{locationsId}/dependencies/{dependenciesId}"
tags: ["projects"]
---

# PATCH /v1/projects/{projectsId}/locations/{locationsId}/dependencies/{dependenciesId}

`PATCH /v1/projects/{projectsId}/locations/{locationsId}/dependencies/{dependenciesId}`

## Request

- Base URL: `https://apihub.googleapis.com`
- URL: `https://apihub.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/dependencies/{dependenciesId}`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/apihub.readwrite`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/apihub.readwrite`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
- TypeScript: <https://skmtc.dev/google/apis/apihub/docs/v1/projects/:projectsId/locations/:locationsId/dependencies/:dependenciesId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update a dependency based on the update_mask provided in the request. The following fields in the dependency can be updated: * description

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `dependenciesId` string, required

## Query parameters

- `updateMask` string, google-fieldmask

## Request body

- GoogleCloudApihubV1Dependency: A dependency resource defined in the API hub describes a dependency directed from a consumer to a supplier entity. A dependency can be defined between two Operations or between an Operation and External API.
  - `attributes` object: Optional. The list of user defined attributes associated with the dependency 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.
  - `consumer` GoogleCloudApihubV1DependencyEntityReference: Reference to an entity participating in a dependency.
    - `displayName` string: Output only. Display name of the entity.
    - `externalApiResourceName` string: The resource name of an external API in the API Hub. Format: `projects/{project}/locations/{location}/externalApis/{external_api}`
    - `operationResourceName` string: The resource name of an operation in the API Hub. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
  - `createTime` string, google-datetime: Output only. The time at which the dependency was created.
  - `description` string: Optional. Human readable description corresponding of the dependency.
  - `discoveryMode` 'DISCOVERY_MODE_UNSPECIFIED' | 'MANUAL': Output only. Discovery mode of the dependency.
  - `errorDetail` GoogleCloudApihubV1DependencyErrorDetail: Details describing error condition of a dependency.
    - `error` 'ERROR_UNSPECIFIED' | 'SUPPLIER_NOT_FOUND' | 'SUPPLIER_RECREATED': Optional. Error in the dependency.
    - `errorTime` string, google-datetime: Optional. Timestamp at which the error was found.
  - `name` string: Identifier. The name of the dependency in the API Hub. Format: `projects/{project}/locations/{location}/dependencies/{dependency}`
  - `state` 'STATE_UNSPECIFIED' | 'PROPOSED' | 'VALIDATED': Output only. State of the dependency.
  - `supplier` GoogleCloudApihubV1DependencyEntityReference: Reference to an entity participating in a dependency.
    - `displayName` string: Output only. Display name of the entity.
    - `externalApiResourceName` string: The resource name of an external API in the API Hub. Format: `projects/{project}/locations/{location}/externalApis/{external_api}`
    - `operationResourceName` string: The resource name of an operation in the API Hub. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
  - `updateTime` string, google-datetime: Output only. The time at which the dependency was last updated.

## Response `200`

Successful response

- GoogleCloudApihubV1Dependency: A dependency resource defined in the API hub describes a dependency directed from a consumer to a supplier entity. A dependency can be defined between two Operations or between an Operation and External API.
  - `attributes` object: Optional. The list of user defined attributes associated with the dependency 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.
  - `consumer` GoogleCloudApihubV1DependencyEntityReference: Reference to an entity participating in a dependency.
    - `displayName` string: Output only. Display name of the entity.
    - `externalApiResourceName` string: The resource name of an external API in the API Hub. Format: `projects/{project}/locations/{location}/externalApis/{external_api}`
    - `operationResourceName` string: The resource name of an operation in the API Hub. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
  - `createTime` string, google-datetime: Output only. The time at which the dependency was created.
  - `description` string: Optional. Human readable description corresponding of the dependency.
  - `discoveryMode` 'DISCOVERY_MODE_UNSPECIFIED' | 'MANUAL': Output only. Discovery mode of the dependency.
  - `errorDetail` GoogleCloudApihubV1DependencyErrorDetail: Details describing error condition of a dependency.
    - `error` 'ERROR_UNSPECIFIED' | 'SUPPLIER_NOT_FOUND' | 'SUPPLIER_RECREATED': Optional. Error in the dependency.
    - `errorTime` string, google-datetime: Optional. Timestamp at which the error was found.
  - `name` string: Identifier. The name of the dependency in the API Hub. Format: `projects/{project}/locations/{location}/dependencies/{dependency}`
  - `state` 'STATE_UNSPECIFIED' | 'PROPOSED' | 'VALIDATED': Output only. State of the dependency.
  - `supplier` GoogleCloudApihubV1DependencyEntityReference: Reference to an entity participating in a dependency.
    - `displayName` string: Output only. Display name of the entity.
    - `externalApiResourceName` string: The resource name of an external API in the API Hub. Format: `projects/{project}/locations/{location}/externalApis/{external_api}`
    - `operationResourceName` string: The resource name of an operation in the API Hub. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
  - `updateTime` string, google-datetime: Output only. The time at which the dependency was last updated.

## Changes

- **2026-11-08** `09b6c7d2247b`: 4 info
  - the security scope `https://www.googleapis.com/auth/apihub.readwrite` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/apihub.readwrite` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/apihub/changes/v1/projects/:projectsId/locations/:locationsId/dependencies/:dependenciesId/patch.md)

---

[API](https://skmtc.dev/google/apis/apihub.md) - [All operations](https://skmtc.dev/google/apis/apihub/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/apihub/revisions/09b6c7d2247b?raw)
