ShowcaseApi

Method

HTTP request

Description

add_showcase_chat

POST /showcase

Add a shared chat to the showcase

delete_showcase_thumbnail

DELETE /showcase/{showcase-id}/thumbnail

Remove a showcase thumbnail

get_showcase_thumbnail

GET /showcase/{showcase-id}/thumbnail

Serve a showcase thumbnail

list_showcase_categories

GET /showcase/categories

List existing showcase categories

list_showcase_chats

GET /showcase

List showcase chats

remove_showcase_chat

DELETE /showcase/{showcase-id}

Remove a chat from the showcase

reorder_showcase_chats

POST /showcase/reorder

Reorder showcase chats

update_showcase_chat

PATCH /showcase/{showcase-id}

Update a showcase tile

upload_showcase_thumbnail

POST /showcase/{showcase-id}/thumbnail

Upload a thumbnail for a showcase tile

add_showcase_chat

AddShowcaseChatResponse add_showcase_chat(add_showcase_chat_request)

Add a shared chat to the showcase

Requires the h2ogpte/chat/manage_showcase permission. Private shared chats may be pinned; their tiles are only listed to authenticated callers.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_sync
from h2ogpte.rest_sync.models.add_showcase_chat_request import AddShowcaseChatRequest
from h2ogpte.rest_sync.models.add_showcase_chat_response import AddShowcaseChatResponse
from h2ogpte.rest_sync.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_sync.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_sync.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with h2ogpte.rest_sync.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_sync.ShowcaseApi(api_client)
    add_showcase_chat_request = h2ogpte.rest_sync.AddShowcaseChatRequest() # AddShowcaseChatRequest | 

    try:
        # Add a shared chat to the showcase
        api_response = api_instance.add_showcase_chat(add_showcase_chat_request)
        print("The response of ShowcaseApi->add_showcase_chat:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShowcaseApi->add_showcase_chat: %s\n" % e)

Parameters

Name

Type

Description

Notes

add_showcase_chat_request

AddShowcaseChatRequest

Return type

AddShowcaseChatResponse

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

201

Successful operation

-

400

Bad request

-

401

Unauthorized - Invalid or missing API key

-

403

Forbidden

-

404

Not found

-

409

Conflict

-

delete_showcase_thumbnail

delete_showcase_thumbnail(showcase_id)

Remove a showcase thumbnail

Requires the h2ogpte/chat/manage_showcase permission. Drops the thumbnail object from storage and clears the showcase row’s thumbnail_path so the tile renders the placeholder icon.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_sync
from h2ogpte.rest_sync.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_sync.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_sync.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with h2ogpte.rest_sync.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_sync.ShowcaseApi(api_client)
    showcase_id = 'showcase_id_example' # str | 

    try:
        # Remove a showcase thumbnail
        api_instance.delete_showcase_thumbnail(showcase_id)
    except Exception as e:
        print("Exception when calling ShowcaseApi->delete_showcase_thumbnail: %s\n" % e)

Parameters

Name

Type

Description

Notes

showcase_id

str

Return type

void (empty response body)

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

204

Successful operation

-

400

Bad request

-

401

Unauthorized - Invalid or missing API key

-

403

Forbidden

-

404

Not found

-

get_showcase_thumbnail

bytearray get_showcase_thumbnail(showcase_id)

Serve a showcase thumbnail

Streams the stored thumbnail image. Public, but only served when showcase_page_mode allows.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_sync
from h2ogpte.rest_sync.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_sync.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_sync.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with h2ogpte.rest_sync.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_sync.ShowcaseApi(api_client)
    showcase_id = 'showcase_id_example' # str | 

    try:
        # Serve a showcase thumbnail
        api_response = api_instance.get_showcase_thumbnail(showcase_id)
        print("The response of ShowcaseApi->get_showcase_thumbnail:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShowcaseApi->get_showcase_thumbnail: %s\n" % e)

Parameters

Name

Type

Description

Notes

showcase_id

str

Return type

bytearray

HTTP request headers

  • Content-Type: Not defined

  • Accept: image/*, application/json

HTTP response details

Status code

Description

Response headers

200

Successful operation

-

400

Bad request

-

401

Unauthorized - Invalid or missing API key

-

404

Not found

-

list_showcase_categories

ListShowcaseCategoriesResponse list_showcase_categories()

List existing showcase categories

Returns the distinct, alphabetically-sorted set of category labels currently in use across showcase tiles. Powers the curator-facing autocomplete so admins reuse existing labels instead of fragmenting the taxonomy with typos. Requires the h2ogpte/chat/manage_showcase permission.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_sync
from h2ogpte.rest_sync.models.list_showcase_categories_response import ListShowcaseCategoriesResponse
from h2ogpte.rest_sync.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_sync.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_sync.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

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

    try:
        # List existing showcase categories
        api_response = api_instance.list_showcase_categories()
        print("The response of ShowcaseApi->list_showcase_categories:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShowcaseApi->list_showcase_categories: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ListShowcaseCategoriesResponse

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

-

403

Forbidden

-

list_showcase_chats

List[ShowcaseChat] list_showcase_chats(offset=offset, limit=limit)

List showcase chats

Public listing of admin-curated shared chats. Visibility is gated by the showcase_page_mode global setting: disabled (404), authenticated (login required, guests blocked), or public (anyone).

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_sync
from h2ogpte.rest_sync.models.showcase_chat import ShowcaseChat
from h2ogpte.rest_sync.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_sync.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_sync.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with h2ogpte.rest_sync.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_sync.ShowcaseApi(api_client)
    offset = 0 # int |  (optional) (default to 0)
    limit = 56 # int |  (optional)

    try:
        # List showcase chats
        api_response = api_instance.list_showcase_chats(offset=offset, limit=limit)
        print("The response of ShowcaseApi->list_showcase_chats:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShowcaseApi->list_showcase_chats: %s\n" % e)

Parameters

Name

Type

Description

Notes

offset

int

[optional] [default to 0]

limit

int

[optional]

Return type

List[ShowcaseChat]

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

-

404

Not found

-

remove_showcase_chat

remove_showcase_chat(showcase_id)

Remove a chat from the showcase

Requires the h2ogpte/chat/manage_showcase permission. The underlying shared chat is untouched; only the tile (and its stored thumbnail) is removed.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_sync
from h2ogpte.rest_sync.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_sync.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_sync.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with h2ogpte.rest_sync.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_sync.ShowcaseApi(api_client)
    showcase_id = 'showcase_id_example' # str | 

    try:
        # Remove a chat from the showcase
        api_instance.remove_showcase_chat(showcase_id)
    except Exception as e:
        print("Exception when calling ShowcaseApi->remove_showcase_chat: %s\n" % e)

Parameters

Name

Type

Description

Notes

showcase_id

str

Return type

void (empty response body)

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

204

Successful operation

-

400

Bad request

-

401

Unauthorized - Invalid or missing API key

-

403

Forbidden

-

404

Not found

-

reorder_showcase_chats

reorder_showcase_chats(reorder_showcase_chats_request)

Reorder showcase chats

Requires the h2ogpte/chat/manage_showcase permission. Atomically reassigns sort_order for each entry.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_sync
from h2ogpte.rest_sync.models.reorder_showcase_chats_request import ReorderShowcaseChatsRequest
from h2ogpte.rest_sync.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_sync.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_sync.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with h2ogpte.rest_sync.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_sync.ShowcaseApi(api_client)
    reorder_showcase_chats_request = h2ogpte.rest_sync.ReorderShowcaseChatsRequest() # ReorderShowcaseChatsRequest | 

    try:
        # Reorder showcase chats
        api_instance.reorder_showcase_chats(reorder_showcase_chats_request)
    except Exception as e:
        print("Exception when calling ShowcaseApi->reorder_showcase_chats: %s\n" % e)

Parameters

Name

Type

Description

Notes

reorder_showcase_chats_request

ReorderShowcaseChatsRequest

Return type

void (empty response body)

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

204

Successful operation

-

400

Bad request

-

401

Unauthorized - Invalid or missing API key

-

403

Forbidden

-

update_showcase_chat

update_showcase_chat(showcase_id, update_showcase_chat_request)

Update a showcase tile

Requires the h2ogpte/chat/manage_showcase permission. Update the tile title, description, or category. Omitted fields are left unchanged. Title and description must remain non-empty (empty / whitespace-only returns 400); category may be cleared by sending an empty string. thumbnail_path is set exclusively by the upload endpoint.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_sync
from h2ogpte.rest_sync.models.update_showcase_chat_request import UpdateShowcaseChatRequest
from h2ogpte.rest_sync.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_sync.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_sync.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with h2ogpte.rest_sync.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_sync.ShowcaseApi(api_client)
    showcase_id = 'showcase_id_example' # str | 
    update_showcase_chat_request = h2ogpte.rest_sync.UpdateShowcaseChatRequest() # UpdateShowcaseChatRequest | 

    try:
        # Update a showcase tile
        api_instance.update_showcase_chat(showcase_id, update_showcase_chat_request)
    except Exception as e:
        print("Exception when calling ShowcaseApi->update_showcase_chat: %s\n" % e)

Parameters

Name

Type

Description

Notes

showcase_id

str

update_showcase_chat_request

UpdateShowcaseChatRequest

Return type

void (empty response body)

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

204

Successful operation

-

400

Bad request

-

401

Unauthorized - Invalid or missing API key

-

403

Forbidden

-

404

Not found

-

upload_showcase_thumbnail

UploadShowcaseThumbnailResponse upload_showcase_thumbnail(showcase_id, file)

Upload a thumbnail for a showcase tile

Requires the h2ogpte/chat/manage_showcase permission. Multipart upload of an image (jpg/png/webp/gif, max 20 MB). Stored in object storage; the resulting path is saved to the showcase entry.

Example

  • Bearer Authentication (bearerAuth):

import h2ogpte.rest_sync
from h2ogpte.rest_sync.models.upload_showcase_thumbnail_response import UploadShowcaseThumbnailResponse
from h2ogpte.rest_sync.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_sync.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_sync.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with h2ogpte.rest_sync.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = h2ogpte.rest_sync.ShowcaseApi(api_client)
    showcase_id = 'showcase_id_example' # str | 
    file = None # bytearray | 

    try:
        # Upload a thumbnail for a showcase tile
        api_response = api_instance.upload_showcase_thumbnail(showcase_id, file)
        print("The response of ShowcaseApi->upload_showcase_thumbnail:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ShowcaseApi->upload_showcase_thumbnail: %s\n" % e)

Parameters

Name

Type

Description

Notes

showcase_id

str

file

bytearray

Return type

UploadShowcaseThumbnailResponse

HTTP request headers

  • Content-Type: multipart/form-data

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

Successful operation

-

400

Bad request

-

401

Unauthorized - Invalid or missing API key

-

403

Forbidden

-

404

Not found

-

413

File too large

-