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 operation 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\u003ereload\u003c/code\u003e function is a long-running operation, with metadata and response details provided in the \u003ccode\u003eKnowledgeOperationMetadata\u003c/code\u003e and \u003ccode\u003eDocument\u003c/code\u003e fields, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request to reload a document requires a POST method with a specific URL format including project, location, knowledge base, and document identifiers, and it must go through gRPC Transcoding.\u003c/p\u003e\n"],["\u003cp\u003eThe request body contains optional parameters, such as \u003ccode\u003eimportGcsCustomMetadata\u003c/code\u003e to import metadata from Google Cloud Storage, and a \u003ccode\u003egcsSource\u003c/code\u003e field for specifying the document source, if omitted the original source will be reloaded.\u003c/p\u003e\n"],["\u003cp\u003eThis operation needs specific OAuth scopes (\u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e) for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.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. 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.\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/v2beta1/KnowledgeOperationMetadata)\n- `response`: [Document](/dialogflow/es/docs/reference/rest/v2beta1/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}/v2beta1/{name=projects/*/locations/*/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/v2beta1/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)."]]