# Read one run plan

Read one run plan. An id the project does not hold, and a test suite id, both answer 404 suite_not_found.

> Page: https://langwatch.ai/docs/api-reference/run-plans/get-run-plans
> Source: https://github.com/langwatch/langwatch/blob/main/docs/api-reference/run-plans/get-run-plans.mdx
> Index of all pages: https://langwatch.ai/docs/llms.txt

## Endpoint

`GET https://app.langwatch.ai/api/v1/run-plans/{id}`

## Authentication

### project_api_key

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

```json
{"id":"project_api_key","type":"apiKey","in":"header","name":"X-Auth-Token"}
```

## Parameters

### id (path, required)

The run plan id.

```json
{"type":"string","minLength":1}
```

## Request example

```bash
curl --request GET \
  --url 'https://app.langwatch.ai/api/v1/run-plans/<id>' \
  --header "X-Auth-Token: $LANGWATCH_API_KEY"
```

## Responses

### 200

Success

#### application/json

Schema:

```json
{
  "type": "object",
  "properties": {
    "id": {"type":"string","description":"The run plan id."},
    "name": {
      "type": "string",
      "description": "The run plan name. This is the plan's identity: a run started under this name joins this plan."
    },
    "slug": {
      "type": "string",
      "description": "The plan's address in the platform. It is kept when the plan is renamed, so run history never moves."
    },
    "scope": {
      "oneOf": [
        {
          "type": "object",
          "properties": {"mode":{"type":"string","const":"all"}},
          "required": ["mode"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "mode": {"type":"string","const":"test_suites"},
            "testSuiteIds": {"type":"array","items":{"type":"string"}}
          },
          "required": ["mode","testSuiteIds"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "mode": {"type":"string","const":"labels"},
            "labels": {"type":"array","items":{"type":"string"}}
          },
          "required": ["mode","labels"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {"mode":{"type":"string","const":"scenarios"}},
          "required": ["mode"],
          "additionalProperties": false
        }
      ],
      "description": "What the run plan covers: all (every active scenario), test_suites (the scenarios filed in the named test suites), labels (the scenarios carrying any of the labels), or scenarios (the scenarioIds sent with the configuration). A dynamic scope is resolved again at every run, so a scenario written later runs without editing the plan."
    },
    "scenarioIds": {
      "type": "array",
      "items": {"type":"string"},
      "description": "The scenarios the last run of this plan covered."
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": ["prompt","http","code","workflow","connected","voice"]
          },
          "referenceId": {"type":"string","minLength":1},
          "scenarioMappings": {
            "type": "object",
            "propertyNames": {"type":"string"},
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {"type":"string","const":"source"},
                    "sourceId": {"type":"string","minLength":1},
                    "path": {"type":"array","items":{"type":"string"}}
                  },
                  "required": ["type","sourceId","path"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {"type":"string","const":"value"},
                    "value": {"type":"string"}
                  },
                  "required": ["type","value"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "runParameters": {
            "type": "object",
            "propertyNames": {"type":"string"},
            "additionalProperties": {
              "anyOf": [
                {"type":"string","maxLength":4096},
                {"type":"number"},
                {"type":"boolean"}
              ]
            }
          },
          "runSecretParameterNames": {
            "maxItems": 50,
            "type": "array",
            "items": {"type":"string","maxLength":64}
          }
        },
        "required": ["type","referenceId"],
        "additionalProperties": false
      },
      "description": "What the plan runs against, in the order the results show. A target carrying runParameters runs with those values."
    },
    "repeatCount": {
      "type": "number",
      "description": "How many times each scenario and target pairing runs."
    },
    "simulatorModel": {
      "description": "The model that plays the user, or null for the scenario or project default.",
      "type": ["string","null"]
    },
    "judgeModel": {
      "description": "The model that judges the run, or null for the scenario or project default.",
      "type": ["string","null"]
    },
    "traceQuietPeriodMs": {
      "description": "Milliseconds the agent's trace must stay unchanged before the judge reads it, or null for the scenario setting or the project's recommendation. Absent on servers that predate judge trace settings.",
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {"type":"null"}
      ]
    },
    "traceWaitTimeoutMs": {
      "description": "Milliseconds the judge waits for the agent's trace before a verdict, or null for the scenario setting or the project's recommendation. Absent on servers that predate judge trace settings.",
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {"type":"null"}
      ]
    },
    "labels": {
      "type": "array",
      "items": {"type":"string"},
      "description": "The labels the plan carries."
    },
    "evaluators": {
      "description": "The plan's own evaluators. Absent on servers that predate evaluators on this family.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "The attachment id. Stable across edits of the attachment."
          },
          "evaluatorId": {
            "type": "string",
            "minLength": 1,
            "description": "The id of the saved evaluator this attachment runs."
          },
          "required": {
            "type": "boolean",
            "description": "Whether a failing result fails the scenario. A score-only evaluator reports and never gates."
          },
          "mappings": {
            "type": "object",
            "propertyNames": {"type":"string","minLength":1,"maxLength":128},
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {"type":"string","const":"source"},
                    "sourceId": {"type":"string","enum":["conversation","scenario","trace"]},
                    "path": {
                      "minItems": 1,
                      "maxItems": 3,
                      "type": "array",
                      "items": {"type":"string","minLength":1,"maxLength":256}
                    }
                  },
                  "required": ["type","sourceId","path"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {"type":"string","const":"value"},
                    "value": {"type":"string","maxLength":65536}
                  },
                  "required": ["type","value"],
                  "additionalProperties": false
                }
              ],
              "description": "Where one evaluator input reads its value. A source mapping names conversation (first_user_message, last_agent_message, transcript, messages), scenario (situation, criteria, or fields followed by a field identifier) or trace (contexts, spans, or tool_calls followed by a tool name and input or output). A value mapping is a literal."
            },
            "description": "Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run."
          }
        },
        "required": ["id","evaluatorId","required","mappings"],
        "additionalProperties": false,
        "description": "One evaluator that runs after every scenario run, with where each of its inputs reads from."
      }
    },
    "archivedAt": {
      "description": "When the plan was archived, or null while it is active.",
      "type": ["string","null"]
    },
    "createdAt": {"type":"string","description":"When the plan was created."},
    "updatedAt": {"type":"string","description":"When the plan was last written."},
    "platformUrl": {
      "type": "string",
      "format": "uri",
      "description": "Where to open this run plan in the LangWatch platform."
    }
  },
  "required": [
    "id",
    "name",
    "slug",
    "scope",
    "scenarioIds",
    "targets",
    "repeatCount",
    "simulatorModel",
    "judgeModel",
    "labels",
    "archivedAt",
    "createdAt",
    "updatedAt",
    "platformUrl"
  ],
  "additionalProperties": false
}
```

### 404

Not Found

#### application/json

Schema:

```json
{
  "type": "object",
  "properties": {"error":{"type":"string"},"message":{"type":"string"}},
  "required": ["error"],
  "additionalProperties": false
}
```

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.
