Reloads the specified document from its specified source, contentUri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: If the document source is Google Cloud Storage URI, its metadata will be replaced with the custom metadata from Google Cloud Storage if the importGcsCustomMetadata field is set to true in the request.
This method is a long-running operation. The returned Operation type has the following method-specific fields:
Required. The name of the document to reload. Format: projects/<Project ID>/locations/<Location
ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
Request body
The request body contains data with the following structure:
JSON representation
{"importGcsCustomMetadata": boolean,// Union field source can be only one of the following:"gcsSource": {object (GcsSource)}// End of list of possible types for union field source.}
Fields
importGcsCustomMetadata
boolean
Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.
Union field source. The source for document reloading.
Optional. If provided, the service will load the contents from the source and update document in the knowledge base.
Reloading from a new document source is allowed for smart messaging documents only. If you want to update the source for other document types, please delete the existing document and create a new one instead. source can be only one of the following:
[[["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-06-27 UTC."],[[["\u003cp\u003eThis endpoint reloads a specified document from its source, deleting the previously loaded content and potentially causing side effects even if the content hasn't changed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePOST\u003c/code\u003e request to reload a document requires a path parameter \u003ccode\u003ename\u003c/code\u003e that specifies the document's identifier in the format: \u003ccode\u003eprojects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body, represented in JSON, can include a boolean \u003ccode\u003eimportGcsCustomMetadata\u003c/code\u003e field to indicate if custom metadata from Google Cloud Storage should be imported.\u003c/p\u003e\n"],["\u003cp\u003eThe request body also includes a \u003ccode\u003esource\u003c/code\u003e field, which can utilize \u003ccode\u003egcsSource\u003c/code\u003e, to reload from a Cloud Storage source, if it is not provided, the existing source will be reloaded.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful document reload operations return an \u003ccode\u003eOperation\u003c/code\u003e instance, and authorization requires one of the OAuth scopes: \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]