h2oGPTe icon

h2oGPTe

h2oGPTe is an AI-powered search assistant for your internal teams to answer questions gleaned from large volumes of documents, websites and workplace content.

Actions198

Overview

This node operation updates attributes of an existing document in the system. It allows users to modify specific properties of a document, such as its name and URI, by specifying the document's unique identifier. This is useful when you need to correct or change metadata associated with a document without re-uploading or recreating it.

Common scenarios:

  • Renaming a document after initial upload to better reflect its content.
  • Updating the URI of a document if its location changes.
  • Correcting metadata errors or adding missing information.

Practical example:
You have a document with ID 12345 named "Old Report" but want to rename it to "Q1 Financial Report" and update its URI to a new location. Using this operation, you provide the document ID along with the new name and URI, and the node updates the document accordingly.

Properties

Name Meaning
Document ID The unique identifier of the document to be updated (required).
Additional Options Optional fields to update on the document:
- Name: New name for the document.
- Uri: New URI/location of the document.

Output

The output contains the full response from the API after updating the document. The main data is typically a JSON object representing the updated document attributes, confirming the changes made.

If the update is successful, the output JSON will include the updated document details such as its ID, name, URI, and other metadata fields.

No binary data is involved in this operation.

Dependencies

  • Requires an API key credential for authentication to the external service.
  • The node sends a PATCH HTTP request to the endpoint /documents/{document_id} with the updated attributes in the request body.
  • The base URL and headers are configured via credentials and node settings.

Troubleshooting

  • Missing Document ID: The operation requires a valid document ID. Ensure that the Document ID field is filled correctly.
  • Invalid or Unauthorized API Key: Authentication failures may occur if the API key is invalid or lacks permissions. Verify your API key credentials.
  • Invalid Field Values: If the provided name or URI values are malformed or violate constraints, the API may return validation errors. Check the input values.
  • Network Issues: Connectivity problems can cause request failures. Confirm network access to the API endpoint.
  • API Endpoint Errors: If the document does not exist or has been deleted, the API will return an error indicating the document was not found.

To resolve errors, verify all required inputs, ensure proper authentication, and check the API documentation for valid attribute formats.

Links and References


This summary covers the "Updates Attributes of an Existing Document" operation under the "Document" resource based on the provided source code and property definitions.

Discussion