SystemApi

Method

HTTP request

Description

download_user_limits_export

GET /admin/user-limits/export

Export user limits as CSV.

get_h2ogpt_system_info

GET /system/h2ogpt-info

Gets H2OGPT system information.

download_user_limits_export

bytearray download_user_limits_export(search=search, filter=filter, user_ids=user_ids)

Export user limits as CSV.

Generates and streams a CSV of user limits data. Admin only.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_async
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
    host = "https://h2ogpte.genai.h2o.ai/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_async.SystemApi(api_client)
    search = 'search_example' # str | Search string to filter users by username or email. (optional)
    filter = 'all' # str | Filter by limit status. One of all, within_limit, approaching, blocked. (optional) (default to 'all')
    user_ids = 'user_ids_example' # str | Comma-separated user IDs to export. When set, search and filter are ignored. (optional)

    try:
        # Export user limits as CSV.
        api_response = await api_instance.download_user_limits_export(search=search, filter=filter, user_ids=user_ids)
        print("The response of SystemApi->download_user_limits_export:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SystemApi->download_user_limits_export: %s\n" % e)

Parameters

Name

Type

Description

Notes

search

str

Search string to filter users by username or email.

[optional]

filter

str

Filter by limit status. One of all, within_limit, approaching, blocked.

[optional] [default to ‘all’]

user_ids

str

Comma-separated user IDs to export. When set, search and filter are ignored.

[optional]

Return type

bytearray

HTTP request headers

  • Content-Type: Not defined

  • Accept: text/csv, application/json

HTTP response details

Status code

Description

Response headers

200

CSV file download

-

400

Bad request

-

401

Unauthorized - Invalid or missing API key

-

403

Admin access required.

-

get_h2ogpt_system_info

H2OGPTSystemInfo get_h2ogpt_system_info()

Gets H2OGPT system information.

Gets H2OGPT system information.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_async
from h2ogpte.rest_async.models.h2_ogpt_system_info import H2OGPTSystemInfo
from h2ogpte.rest_async.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://h2ogpte.genai.h2o.ai/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = h2ogpte.rest_async.Configuration(
    host = "https://h2ogpte.genai.h2o.ai/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = h2ogpte.rest_async.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
async with h2ogpte.rest_async.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_async.SystemApi(api_client)

    try:
        # Gets H2OGPT system information.
        api_response = await api_instance.get_h2ogpt_system_info()
        print("The response of SystemApi->get_h2ogpt_system_info:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SystemApi->get_h2ogpt_system_info: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

H2OGPTSystemInfo

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

Successful operation

-

400

Bad request

-

401

Unauthorized - Invalid or missing API key

-