Stay organized with collections
Save and categorize content based on your preferences.
Create a link between a source document and a target document.
HTTP request
POST https://contentwarehouse.googleapis.com/v1/{parent}/documentLinks
Path parameters
Parameters
parent
string
Required. Parent of the document-link to be created. parent of document-link should be a document. Format: projects/{projectNumber}/locations/{location}/documents/{source_document_id}. It takes the form projects/{project}/locations/{location}/documents/{document}.
Request body
The request body contains data with the following structure:
[[["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-05-08 UTC."],[[["\u003cp\u003eThis endpoint facilitates the creation of a link between a source document and a target document using a POST request.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eparent\u003c/code\u003e path parameter, representing the source document, is a required field and follows the format \u003ccode\u003eprojects/{project}/locations/{location}/documents/{document}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires two main components, \u003ccode\u003edocumentLink\u003c/code\u003e to define the document links and \u003ccode\u003erequestMetadata\u003c/code\u003e for access control information.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests will return a new \u003ccode\u003eDocumentLink\u003c/code\u003e instance in the response body, representing the created link.\u003c/p\u003e\n"],["\u003cp\u003eThe use of this API requires the \u003ccode\u003econtentwarehouse.documents.update\u003c/code\u003e IAM permission on the source document and the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.documents.documentLinks.create\n\nCreate a link between a source document and a target document.\n\n### HTTP request\n\n`POST https://contentwarehouse.googleapis.com/v1/{parent}/documentLinks`\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [DocumentLink](/document-warehouse/docs/reference/rest/v1/DocumentLink).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `contentwarehouse.documents.update`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]