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

The "List Documents" operation of the Document resource allows users to retrieve a list of documents accessible to them. This operation supports filtering, sorting, and pagination, enabling efficient browsing through potentially large sets of documents. It is particularly useful in scenarios where users need to display or process document metadata in bulk, such as generating reports, managing document libraries, or integrating document data into workflows.

For example, a user might want to list all documents updated recently, filter documents by specific metadata attributes, or limit the number of returned documents for performance reasons.

Properties

Name Meaning
Ascending Boolean flag indicating if results should be sorted in ascending order by the specified sort column.
Limit Maximum number of documents to return (minimum 1).
Metadata Filter JSON string representing metadata criteria to filter documents.
Offset Number of documents to skip before starting to return results (for pagination).
Sort Column Field by which to sort the documents. Options include: Connector, Name, Original Mtime, Original Type, Page Count, Size, Status, Type, Updated At, Uri, Username. Default is "updated_at".
With Summaries Boolean flag indicating whether to include summary and summary parameters along with other common document attributes.

Output

The output contains a JSON array of document objects matching the query parameters. Each document object includes standard metadata fields such as name, type, size, status, update timestamps, and optionally summaries if requested. The node does not output binary data for this operation.

Dependencies

  • Requires an API key credential for authentication to the external service.
  • The base URL for API requests is configured from the credential's URL.
  • The node sends HTTP GET requests to the /documents endpoint with query parameters based on input properties.

Troubleshooting

  • Empty Results: If no documents are returned, verify that the filters (metadata_filter, offset, limit) are set correctly and that the user has access to documents.
  • Invalid Metadata Filter: Ensure the metadata filter is a valid JSON string; otherwise, the API may reject the request.
  • Timeouts or Slow Responses: Large limits or complex filters may cause slow responses; try reducing the limit or simplifying filters.
  • Authentication Errors: Confirm that the API key credential is valid and has sufficient permissions to list documents.

Links and References

  • Refer to the external API documentation for the /documents endpoint for detailed information on supported query parameters and response structure.
  • For JSON metadata filtering syntax, consult the API's metadata filtering guide.

Discussion