dots.v2.genAi.simulation_runs.byRun_uuid().episodes.get()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.genAi.simulation_runs.byRun_uuid(run_uuid).episodes.get(requestConfiguration?: RequestConfiguration<EpisodesRequestBuilderGetQueryParameters>): Promise<undefined | ApiListSimulationEpisodesOutput>

Description

To list the episodes within a simulation run, send a GET request to /v2/gen-ai/simulation_runs/{run_uuid}/episodes.

Parameters

Path Parameters

run_uuid string required

Example: "123e4567-e89b-12d3-a456-426614174000"

UUID of the run whose episodes to list.

Query Parameters

scenarioUuid string optional

Example: 123e4567-e89b-12d3-a456-426614174000

Optional filter by scenario.

page integer optional

Example: 1

Page number.

perPage integer optional

Example: 1

Items per page.

statuses array of strings optional

Example: ["SIMULATION_EPISODE_STATUS_FINISHED"]

Filter by one or more statuses. Empty means no status filter.

- SIMULATION_EPISODE_STATUS_RUNNING: The episode is executing and a trajectory is available to retrieve.
- SIMULATION_EPISODE_STATUS_FINISHED: The episode reached a stop condition and produced a verdict.
- SIMULATION_EPISODE_STATUS_FAILED: The episode failed because of a cancel, timeout, or error.
- SIMULATION_EPISODE_STATUS_PREPARING: The episode is allocated but its trajectory is not available yet.

verdicts array of strings optional

Example: ["SIMULATION_EPISODE_VERDICT_SUCCESS"]

Filter by one or more verdicts. Empty means no verdict filter.

- SIMULATION_EPISODE_VERDICT_SUCCESS: The candidate agent satisfied the scenario's stopping criteria.
- SIMULATION_EPISODE_VERDICT_FAILURE: The candidate agent did not satisfy the stopping criteria.
- SIMULATION_EPISODE_VERDICT_INCONCLUSIVE: No conclusive verdict (e.g. max_turns reached without the judge finishing).

search string optional

Example: example string

Free-text search across scenario_uuid and session_id
(case-insensitive substring match). Empty means no search.

sortBy string optional

Field to sort by. Defaults to scenario ordering when unspecified.

- SIMULATION_EPISODE_SORT_FIELD_SCENARIO: Sort by scenario_uuid then episode_index. Default.
- SIMULATION_EPISODE_SORT_FIELD_CREATED_AT: Sort by creation date.
- SIMULATION_EPISODE_SORT_FIELD_STATUS: Sort by episode status using lifecycle order.
- SIMULATION_EPISODE_SORT_FIELD_VERDICT: Sort by verdict (nulls last).

One of: SIMULATION_EPISODE_SORT_FIELD_UNSPECIFIED, SIMULATION_EPISODE_SORT_FIELD_SCENARIO, SIMULATION_EPISODE_SORT_FIELD_CREATED_AT, SIMULATION_EPISODE_SORT_FIELD_STATUS, SIMULATION_EPISODE_SORT_FIELD_VERDICT

Default: SIMULATION_EPISODE_SORT_FIELD_UNSPECIFIED

sortDirection string optional

Sort direction. Defaults to ascending when unspecified.

One of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC

Default: SORT_DIRECTION_UNSPECIFIED

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.genAi.simulation_runs
    .byRun_uuid("\"123e4567-e89b-12d3-a456-426614174000\"").episodes.get();

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.simulation_runs
    .byRun_uuid("\"123e4567-e89b-12d3-a456-426614174000\"").episodes.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.simulation_runs
        .byRun_uuid("\"123e4567-e89b-12d3-a456-426614174000\"").episodes.get({
        queryParameters: {
            page,
        },
    });
    pages = response?.links?.pages;
}

Response Example

Show Response Example
{
  "available_sort_by": [
    "SIMULATION_EPISODE_SORT_FIELD_UNSPECIFIED"
  ],
  "available_sort_directions": [
    "SORT_DIRECTION_UNSPECIFIED"
  ],
  "available_statuses": [
    "SIMULATION_EPISODE_STATUS_UNSPECIFIED"
  ],
  "available_verdicts": [
    "SIMULATION_EPISODE_VERDICT_UNSPECIFIED"
  ],
  "episodes": [
    {
      "created_at": "2023-01-01T00:00:00Z",
      "duration_sec": "12345",
      "failure_reason": "example string",
      "episode_index": 123,
      "episode_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "judge_reasoning": "example string",
      "run_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000",
      "session_id": "123e4567-e89b-12d3-a456-426614174000",
      "status": "SIMULATION_EPISODE_STATUS_UNSPECIFIED",
      "trajectory_bucket_name": "example name",
      "trajectory_bucket_region": "example string",
      "trajectory_spaces_key": "example string",
      "updated_at": "2023-01-01T00:00:00Z",
      "verdict": "SIMULATION_EPISODE_VERDICT_UNSPECIFIED"
    }
  ],
  "links": {
    "pages": {
      "first": "example string",
      "last": "example string",
      "next": "example string",
      "previous": "example string"
    }
  },
  "meta": {
    "page": 123,
    "pages": 123,
    "total": 123
  }
}

More Information

See /v2/gen-ai/simulation_runs/{run_uuid}/episodes 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.