Stay organized with collections
Save and categorize content based on your preferences.
Lock the document so the document cannot be updated by other users.
HTTP request
POST https://contentwarehouse.googleapis.com/v1/{name}:lock
Path parameters
Parameters
name
string
Required. The name of the document to lock. Format: projects/{projectNumber}/locations/{location}/documents/{document}. 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 document details how to lock a document to prevent updates from other users via a POST HTTP request.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e path parameter is required, specifying the document's unique identifier in the format \u003ccode\u003eprojects/{projectNumber}/locations/{location}/documents/{document}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include the \u003ccode\u003ecollectionId\u003c/code\u003e and \u003ccode\u003elockingUser\u003c/code\u003e fields.\u003c/p\u003e\n"],["\u003cp\u003eSuccessfully locking a document returns an instance of the Document in the response body.\u003c/p\u003e\n"],["\u003cp\u003eLocking a document requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e and the IAM permission \u003ccode\u003econtentwarehouse.documents.update\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.documents.lock\n\nLock the document so the document cannot be updated by other users.\n\n### HTTP request\n\n`POST https://contentwarehouse.googleapis.com/v1/{name}:lock`\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 an instance of [Document](/document-warehouse/docs/reference/rest/v1/Document).\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 `name` resource:\n\n- `contentwarehouse.documents.update`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]