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, "Returns Usage Statistics Grouped by Users" under the "Model" resource, retrieves usage statistics data grouped by individual users for a specified time interval. It is useful for monitoring and analyzing how different users are utilizing AI models over a given period.

Typical use cases include:

  • Tracking user activity and model usage in an organization.
  • Generating reports on user engagement with AI models.
  • Auditing and billing based on user-specific usage metrics.

For example, you might want to get the usage stats for the last 24 hours to see which users have been most active or to identify usage patterns.

Properties

Name Meaning
Interval The length of the time interval for which usage statistics will be obtained. The interval ends at the current time. Example: "24 hours".

Output

The output JSON contains usage statistics grouped by users for the specified interval. Each entry typically includes user identifiers and their corresponding usage metrics within that interval.

The node does not output binary data; it returns structured JSON data representing usage statistics.

Dependencies

  • Requires an API key credential for authentication to the external service providing the model usage statistics.
  • The node sends a GET request to the endpoint /stats/usage_by_user with the interval query parameter specifying the time range.

Troubleshooting

  • Missing or invalid interval: The interval property is required. If omitted or incorrectly formatted, the API may return an error or no data.
  • Authentication errors: Ensure the API key credential is correctly configured and has sufficient permissions.
  • Network issues: Connectivity problems can cause request failures; verify network access to the API endpoint.
  • API rate limits: Excessive requests may be throttled; consider adding delays or handling rate limit responses gracefully.

Links and References

  • Refer to the API documentation of the external service for details on the /stats/usage_by_user endpoint and supported interval formats.
  • Consult n8n documentation on configuring API key credentials and HTTP request nodes for integration setup.

Discussion