pydo.genai.list_scenario_library()
Generated on 1 Oct 2026
from pydo version
v0.43.0
Usage
client.genai.list_scenario_library(
page=None,
per_page=None,
category=None,
search=None,
sort_by="SCENARIO_LIBRARY_SORT_FIELD_UNSPECIFIED",
sort_direction="SORT_DIRECTION_UNSPECIFIED",
)Description
To list the platform-curated Common Scenario & Goal Library, send a GET request to /v2/gen-ai/scenario_library.
Parameters
pageinteger optionalPage number.
per_pageinteger optionalItems per page.
categorystring optionalFilter by category (exact match). Empty means no category filter.
searchstring optionalFree-text search across name, description, and goal_description
(case-insensitive substring match). Empty means no search.sort_bystring optionalField to sort by. Defaults to name when unspecified.
- SCENARIO_LIBRARY_SORT_FIELD_NAME: Sort by customer-facing name (case-insensitive). Default.
- SCENARIO_LIBRARY_SORT_FIELD_CREATED_AT: Sort by creation date.sort_directionstring optionalSort direction. Defaults to ascending when unspecified.
Pagination
This method returns paginated results. The response includes a
links.pages object with URLs for navigating between pages. To
retrieve the next page, parse the next URL and pass the page
parameter:
from urllib.parse import urlparse, parse_qs
resp = client.genai.list_scenario_library()
pages = resp.get("links", {}).get("pages", {})
while "next" in pages:
parsed = urlparse(pages["next"])
page = int(parse_qs(parsed.query)["page"][0])
resp = client.genai.list_scenario_library(page=page)
pages = resp.get("links", {}).get("pages", {})Response Example
More Information
See /v2/gen-ai/scenario_library in the API reference for additional detail on responses, headers, parameters, and more.