import requests
url = "https://app.langwatch.ai/api/v1/run-plans/{id}/run"
payload = {
"idempotencyKey": "<string>",
"parameters": {},
"note": "<string>"
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({idempotencyKey: '<string>', parameters: {}, note: '<string>'})
};
fetch('https://app.langwatch.ai/api/v1/run-plans/{id}/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/run-plans/{id}/run \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"idempotencyKey": "<string>",
"parameters": {},
"note": "<string>"
}
'{
"scheduled": true,
"batchRunId": "<string>",
"setId": "<string>",
"jobCount": 123,
"skippedArchived": {
"scenarios": [
"<string>"
],
"targets": [
"<string>"
]
},
"items": [
{
"scenarioRunId": "<string>",
"scenarioId": "<string>",
"target": {
"type": "prompt",
"referenceId": "<string>"
},
"name": "<string>"
}
],
"runPlanId": "<string>",
"planName": "<string>",
"created": true,
"platformUrl": "<string>"
}Run a plan again
Run a run plan again, with the configuration it already holds. To run a different configuration, post it to /run under the plan’s name.
import requests
url = "https://app.langwatch.ai/api/v1/run-plans/{id}/run"
payload = {
"idempotencyKey": "<string>",
"parameters": {},
"note": "<string>"
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({idempotencyKey: '<string>', parameters: {}, note: '<string>'})
};
fetch('https://app.langwatch.ai/api/v1/run-plans/{id}/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/run-plans/{id}/run \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"idempotencyKey": "<string>",
"parameters": {},
"note": "<string>"
}
'{
"scheduled": true,
"batchRunId": "<string>",
"setId": "<string>",
"jobCount": 123,
"skippedArchived": {
"scenarios": [
"<string>"
],
"targets": [
"<string>"
]
},
"items": [
{
"scenarioRunId": "<string>",
"scenarioId": "<string>",
"target": {
"type": "prompt",
"referenceId": "<string>"
},
"name": "<string>"
}
],
"runPlanId": "<string>",
"planName": "<string>",
"created": true,
"platformUrl": "<string>"
}Authorizations
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.
Path Parameters
The run plan id.
1Body
Repeat the same key to make a retry join the batch the first call started instead of running everything again. Defaults to a new key per call.
Constant values applied to every scenario in the run, e.g. a fixture id or a tenant. A value supplied here overrides the scenario's own default for that name.
Show child attributes
Show child attributes
One short line describing why this batch was run, e.g. a commit hash or what you changed. It is stored on every run of the batch and shown beside the run in the platform. Up to 200 characters.
200Response
Success
True once the runs are queued.
The id of this batch. Every run started here carries it.
The result set the batch is filed under in the platform.
How many runs were queued.
What the run left out, and why.
Show child attributes
Show child attributes
Every run this call queued.
Show child attributes
Show child attributes
The run plan this run was filed under.
The name that plan answers to.
True when this run created the plan, false when it joined a plan already there.
Where to watch this run in the LangWatch platform.
Was this page helpful?