curl -X POST "https://api.magpipe.ai/functions/v1/run-test" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"test_case_id": "b2c3d4e5-2345-6789-abcd-ef0123456789"
}'
{
"run_id": "c3d4e5f6-3456-789a-bcde-f01234567890",
"status": "running",
"message": "Test run started"
}
Testing
Run Test Case
Fire a test run for a test case
POST
/
run-test
curl -X POST "https://api.magpipe.ai/functions/v1/run-test" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"test_case_id": "b2c3d4e5-2345-6789-abcd-ef0123456789"
}'
{
"run_id": "c3d4e5f6-3456-789a-bcde-f01234567890",
"status": "running",
"message": "Test run started"
}
Starts a test run for a test case. The system places a real call using the test case configuration, evaluates all assertions after the call completes, and generates an AI analysis for any failures.
The run executes asynchronously — this endpoint returns a
run_id immediately. Poll List Test Runs to check the result.
Body Parameters
Response
Run Status Values
| Status | Description |
|---|---|
pending | Queued, not yet started |
running | Call is in progress |
passed | All assertions passed |
failed | One or more assertions failed |
error | System error prevented the run from completing |
curl -X POST "https://api.magpipe.ai/functions/v1/run-test" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"test_case_id": "b2c3d4e5-2345-6789-abcd-ef0123456789"
}'
{
"run_id": "c3d4e5f6-3456-789a-bcde-f01234567890",
"status": "running",
"message": "Test run started"
}