pydo.genai.list_scenarios()

Generated on 1 Oct 2026 from pydo version v0.43.0

Usage

client.genai.list_scenarios(
    scenario_set_uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
    page=None,
    per_page=None,
    search=None,
    sort_by="SCENARIO_SORT_FIELD_UNSPECIFIED",
    sort_direction="SORT_DIRECTION_UNSPECIFIED",
)
Returns JSONRaises HttpResponseError

Description

To list the scenarios in a scenario set, send a GET request to /v2/gen-ai/scenario_sets/{scenario_set_uuid}/scenarios.

Parameters

scenario_set_uuid string required

UUID of the scenario set to read.

page integer optional

Page number.

per_page integer optional

Items per page.

search string optional

Free-text search across name, description, and user_persona
(case-insensitive substring match). Empty means no search.

sort_by string optional

Field to sort by. Defaults to original file order when unspecified.

- SCENARIO_SORT_FIELD_FILE_ORDER: Preserve original file order. Default.
- SCENARIO_SORT_FIELD_NAME: Sort by scenario name (case-insensitive). Empty names sort last.
- SCENARIO_SORT_FIELD_DESCRIPTION: Sort by scenario description (case-insensitive).

One of: SCENARIO_SORT_FIELD_UNSPECIFIED, SCENARIO_SORT_FIELD_FILE_ORDER, SCENARIO_SORT_FIELD_NAME, SCENARIO_SORT_FIELD_DESCRIPTION

Default: SCENARIO_SORT_FIELD_UNSPECIFIED

sort_direction string optional

Sort direction. Defaults to ascending when unspecified.

One of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC

Default: SORT_DIRECTION_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_scenarios(scenario_set_uuid="\"123e4567-e89b-12d3-a456-426614174000\"", )
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_scenarios(scenario_set_uuid="\"123e4567-e89b-12d3-a456-426614174000\"", page=page)
    pages = resp.get("links", {}).get("pages", {})

Response Example

Show Response Example
{
  "available_sort_by": [
    "SCENARIO_SORT_FIELD_UNSPECIFIED"
  ],
  "available_sort_directions": [
    "SORT_DIRECTION_UNSPECIFIED"
  ],
  "links": {
    "pages": {
      "first": "example string",
      "last": "example string",
      "next": "example string",
      "previous": "example string"
    }
  },
  "meta": {
    "page": 123,
    "pages": 123,
    "total": 123
  },
  "scenarios": [
    {
      "description": "example string",
      "exploration_budget": 123,
      "max_turns": 123,
      "name": "example name",
      "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "stopping_criteria": [
        "example string"
      ],
      "user_persona": "example string"
    }
  ]
}

More Information

See /v2/gen-ai/scenario_sets/{scenario_set_uuid}/scenarios in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.