curl --request PUT \
--url https://dash.empirical.run/api/test-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"environment": "<string>",
"build": {
"url": "<string>",
"branch": "<string>",
"commit": "<string>",
"commit_url": "<string>",
"version": "<string>"
},
"metadata": {},
"environment_variables_overrides": [
{
"name": "<string>",
"value": "<string>"
}
]
}
'{
"data": {
"trigger": {
"success": true
},
"test_run": {
"id": 456,
"state": "queued",
"test_run_branch": "main",
"created_at": "2024-01-15T10:30:00.000Z"
}
}
}
Trigger a new test run
curl --request PUT \
--url https://dash.empirical.run/api/test-runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"environment": "<string>",
"build": {
"url": "<string>",
"branch": "<string>",
"commit": "<string>",
"commit_url": "<string>",
"version": "<string>"
},
"metadata": {},
"environment_variables_overrides": [
{
"name": "<string>",
"value": "<string>"
}
]
}
'{
"data": {
"trigger": {
"success": true
},
"test_run": {
"id": 456,
"state": "queued",
"test_run_branch": "main",
"created_at": "2024-01-15T10:30:00.000Z"
}
}
}
{
"data": {
"trigger": {
"success": true
},
"test_run": {
"id": 456,
"state": "queued",
"test_run_branch": "main",
"created_at": "2024-01-15T10:30:00.000Z"
}
}
}
curl -X PUT \
https://dash.empirical.run/api/test-runs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $EMPIRICALRUN_KEY" \
-d '{
"environment": "production"
}'
curl -X PUT \
https://dash.empirical.run/api/test-runs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $EMPIRICALRUN_KEY" \
-d '{
"environment": "production",
"build": {
"url": "https://app.example.com",
"branch": "main",
"commit": "abc123",
"commit_url": "https://github.com/org/repo/commit/abc123"
},
"metadata": {
"deployed_by": "alice"
}
}'
curl -X PUT \
https://dash.empirical.run/api/test-runs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $EMPIRICALRUN_KEY" \
-d '{
"environment": "staging",
"environment_variables_overrides": [
{ "name": "BASE_URL", "value": "https://staging.example.com" }
]
}'
API key from the Empirical dashboard.
Test run to create.
Created test run.
Show child attributes
Was this page helpful?