Poll a run
import requests
url = "https://app.langwatch.ai/api/experiments/runs/{runId}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/experiments/runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/experiments/runs/{runId} \
--header 'X-Auth-Token: <api-key>'{
"runId": "<string>",
"progress": 123,
"total": 123,
"startedAt": 123,
"finishedAt": 123,
"summary": {
"runId": "<string>",
"totalCells": 123,
"completedCells": 123,
"failedCells": 123,
"duration": 123,
"timestamps": {
"startedAt": 123,
"finishedAt": 123,
"stoppedAt": 123
},
"chDispatchFailures": 123,
"targets": [
{
"targetId": "<string>",
"name": "<string>",
"passed": 123,
"failed": 123,
"avgLatency": 123,
"totalCost": 123
}
],
"evaluators": [
{
"evaluatorId": "<string>",
"name": "<string>",
"passed": 123,
"failed": 123,
"passRate": 123,
"avgScore": 123
}
],
"totalPassed": 123,
"totalFailed": 123,
"passRate": 123,
"totalCost": 123,
"runUrl": "<string>"
},
"error": "<string>",
"domainError": {
"code": "<string>",
"kind": "<string>",
"message": "<string>",
"meta": {},
"httpStatus": 123,
"fault": "<string>",
"traceId": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
},
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}Experiments
Poll a run
Current state of one run. Returns progress while it is going and a summary once it finishes, so a CI job can poll this until status leaves running.
GET
/
api
/
experiments
/
runs
/
{runId}
Poll a run
import requests
url = "https://app.langwatch.ai/api/experiments/runs/{runId}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/experiments/runs/{runId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/experiments/runs/{runId} \
--header 'X-Auth-Token: <api-key>'{
"runId": "<string>",
"progress": 123,
"total": 123,
"startedAt": 123,
"finishedAt": 123,
"summary": {
"runId": "<string>",
"totalCells": 123,
"completedCells": 123,
"failedCells": 123,
"duration": 123,
"timestamps": {
"startedAt": 123,
"finishedAt": 123,
"stoppedAt": 123
},
"chDispatchFailures": 123,
"targets": [
{
"targetId": "<string>",
"name": "<string>",
"passed": 123,
"failed": 123,
"avgLatency": 123,
"totalCost": 123
}
],
"evaluators": [
{
"evaluatorId": "<string>",
"name": "<string>",
"passed": 123,
"failed": 123,
"passRate": 123,
"avgScore": 123
}
],
"totalPassed": 123,
"totalFailed": 123,
"passRate": 123,
"totalCost": 123,
"runUrl": "<string>"
},
"error": "<string>",
"domainError": {
"code": "<string>",
"kind": "<string>",
"message": "<string>",
"meta": {},
"httpStatus": 123,
"fault": "<string>",
"traceId": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
},
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"fault": "<string>",
"tips": [
"<string>"
],
"docsUrl": "<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
Response
Run state
Available options:
pending, running, completed, failed, stopped Cells finished so far
Cells in the run
Unix milliseconds
Unix milliseconds; set once the run is no longer running
Present when completed
Show child attributes
Show child attributes
Stable failure code, present when failed. Not display copy: render your own wording keyed on it.
The full failure envelope, when the failure carried one
Show child attributes
Show child attributes
Trace id for failures that carry no code, to quote in support
Was this page helpful?
⌘I