dots.v2.genAi.scenario_library.get()
Generated on 27 Oct 2026
from DoTs version
v1.21.0
Usage
client.v2.genAi.scenario_library.get(requestConfiguration?: RequestConfiguration<Scenario_libraryRequestBuilderGetQueryParameters>): Promise<undefined | ApiListScenarioLibraryOutput>Description
To list the platform-curated Common Scenario & Goal Library, send a GET request to /v2/gen-ai/scenario_library.
Parameters
pageinteger optionalExample:
1Page number.
perPageinteger optionalExample:
1Items per page.
categorystring optionalExample:
example stringFilter by category (exact match). Empty means no category filter.
searchstring optionalExample:
example stringFree-text search across name, description, and goal_description
(case-insensitive substring match). Empty means no search.sortBystring 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.sortDirectionstring optionalSort direction. Defaults to ascending when unspecified.
Request Sample
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 query parameter:
let response = await client.v2.genAi.scenario_library.get();
let pages = response?.links?.pages;
while (pages && "next" in pages && typeof pages.next === "string") {
const page = Number(new URL(pages.next).searchParams.get("page"));
response = await client.v2.genAi.scenario_library.get({
queryParameters: {
page,
},
});
pages = response?.links?.pages;
}Response Example
More Information
See /v2/gen-ai/scenario_library in the API reference for additional detail on responses, headers, parameters, and more.