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.
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,"smartMessagingPartialUpdate": boolean,// Union field source can be only one of the following:"contentUri": string// End of list of possible types for union field source.}
Fields
importGcsCustomMetadata
boolean
Optional. Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.
smartMessagingPartialUpdate
boolean
Optional. When enabled, the reload request is to apply partial update to the smart messaging allowlist.
Union field source. The source for document reloading.
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:
contentUri
string
Optional. The path of gcs source file for reloading document content. For now, only gcs uri is supported.
For documents stored in Google Cloud Storage, these URIs must have the form gs://<bucket-name>/<object-name>.
Response body
If successful, the response body contains an instance of Operation.
[[["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 webpage details the process of reloading a specified document, which entails deleting the previously loaded content and retrieving fresh data from the defined source.\u003c/p\u003e\n"],["\u003cp\u003eThe document reload operation is a long-running process, indicated by an \u003ccode\u003eOperation\u003c/code\u003e type, with specific metadata and response fields detailing the reload outcome.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request uses the POST method with a specific URL structure that incorporates path parameters such as the document's name, with the name format requiring \u003ccode\u003eProject ID\u003c/code\u003e, \u003ccode\u003eLocation ID\u003c/code\u003e, \u003ccode\u003eKnowledge Base ID\u003c/code\u003e, and \u003ccode\u003eDocument ID\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can include parameters like \u003ccode\u003eimportGcsCustomMetadata\u003c/code\u003e and \u003ccode\u003esmartMessagingPartialUpdate\u003c/code\u003e, and it must contain a \u003ccode\u003esource\u003c/code\u003e field, such as \u003ccode\u003econtentUri\u003c/code\u003e, specifying the origin of the content to be loaded.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this action requires either the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e OAuth scopes.\u003c/p\u003e\n"]]],[],null,["# Method: projects.agent.knowledgeBases.documents.reload\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReloads 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.\n\nThis method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields:\n\n- `metadata`: [KnowledgeOperationMetadata](/dialogflow/es/docs/reference/rest/v2/KnowledgeOperationMetadata)\n- `response`: [Document](/dialogflow/es/docs/reference/rest/v2/projects.agent.knowledgeBases.documents#Document)\n\nNote: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.\n\n### HTTP request\n\n`POST https://{endpoint}/v2/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/es/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\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 [Operation](/dialogflow/es/docs/reference/rest/v2/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/dialogflow`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]