Required. The parent resource for the dependency resource. Format: projects/{project}/locations/{location}
Query parameters
Parameters
dependencyId
string
Optional. The ID to use for the dependency resource, which will become the final component of the dependency's resource name. This field is optional. * If provided, the same will be used. The service will throw an error if duplicate id is provided by the client. * If not provided, a system generated id will be used.
This value should be 4-500 characters, and valid characters are [a-z][A-Z][0-9]-_.
Request body
The request body contains an instance of Dependency.
Response body
If successful, the response body contains a newly created instance of Dependency.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
IAM Permissions
Requires the following IAM permission on the parent resource:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003eThis API endpoint creates a dependency resource within a specified project and location using a POST request to the \u003ccode\u003e/dependencies\u003c/code\u003e path.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a parent resource path, formatted as \u003ccode\u003eprojects/{project}/locations/{location}\u003c/code\u003e, and accepts an optional \u003ccode\u003edependencyId\u003c/code\u003e query parameter for a custom ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should include a \u003ccode\u003eDependency\u003c/code\u003e resource instance, and a successful response returns the newly created \u003ccode\u003eDependency\u003c/code\u003e resource.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e and the IAM permission \u003ccode\u003eapihub.dependencies.create\u003c/code\u003e on the parent resource.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.dependencies.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nCreate a dependency between two entities in the API hub.\n\n### HTTP request\n\n`POST https://apihub.googleapis.com/v1/{parent=projects/*/locations/*}/dependencies`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Dependency](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.dependencies#Dependency).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Dependency](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.dependencies#Dependency).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `apihub.dependencies.create`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]