---
title: "Fetch an eval-episode job result"
method: GET
path: "/rl/environments/{environmentId}/eval-episodes/{jobId}"
tags: ["RL Environments"]
---

# Fetch an eval-episode job result

`GET /rl/environments/{environmentId}/eval-episodes/{jobId}`

## Request

- Base URL: `https://www.cloudworldmodel.ai/api`
- URL: `https://www.cloudworldmodel.ai/api/rl/environments/{environmentId}/eval-episodes/{jobId}`
- Auth: none required

Polls the status of an async eval job created by
`POST /rl/environments/{environmentId}/eval-episodes`.

- While the job is `pending` or `running` the endpoint returns `202` with only `{jobId, status, createdAt}`.
- When the job is `completed` the endpoint returns `200` with the full eval result merged with job metadata.
- When the job is `failed` the endpoint returns `200` with `{jobId, status, error, createdAt, completedAt}`.

## Path parameters

- `environmentId` string, uuid, required
- `jobId` string, uuid, required

## Response `200`

Job completed (or failed) — inspect `status` to distinguish

- union
  - RLEvalJobCompleted
    - `episodes` object[], required: Per-episode results in the same order as the request `actions` array
      - `episodeIndex` integer, required: Zero-based index of this episode in the request array
      - `stepsExecuted` integer, required: Number of actions executed (may be less than the action array length if the episode ended early)
      - `totalReward` number, required: Cumulative reward across all steps in this eval episode
      - `steps` object[]: Per-step error evidence from the replay; database pressure details omit zero-contribution databases.
        - `step` integer, required: One-based step number within this evaluation episode
        - `error_breakdown` ErrorBreakdown (unresolved $ref)
    - `meanEvalReward` number, required: Mean of `totalReward` across all eval episodes
    - `trainingTotalReward` number, required: Stored cumulative training reward from the environment (the baseline being compared against)
    - `collapseThreshold` number, required: The collapse threshold used for this evaluation (echoed from request)
    - `reward_collapse` boolean, required: `true` when `meanEvalReward` falls more than `collapseThreshold × |trainingTotalReward|` below `trainingTotalReward`. Indicates the policy exploits cost dimensions unpriced during training.
    - `jobId` string, uuid, required
    - `status` 'completed', required
    - `createdAt` string, date-time, required
    - `completedAt` string, date-time, required
  - RLEvalJobFailed
    - `jobId` string, uuid, required
    - `status` 'failed', required
    - `error` string: Error message describing why the job failed
    - `createdAt` string, date-time, required
    - `completedAt` string, date-time

## Other responses

- `202`: Job is still pending or running — continue polling
- `401`: No credentials provided to an API-key-protected endpoint. The response body includes a machine-readable `apiKeyAuth` block pointing to the key creation endpoint so agents can self-serve an API key without consulting the spec.
- `403`: Access denied — caller does not own this RL environment or job
- `404`: Resource not found
- `429`: Rate limit exceeded — slow down requests or upgrade your API key's rate limit

---

[API](https://skmtc.dev/cloudworldmodel/apis/cloud-world-model-agent-api.md) · [All operations](https://skmtc.dev/cloudworldmodel/apis/cloud-world-model-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cloudworldmodel/apis/cloud-world-model-agent-api/revisions/ecc3ad1ff07f?raw)
