Loading...
Loading...
Work with Shiplight Cloud v2/Nova test results APIs: create local or CI test runs, upload result artifacts, complete runs, and retrieve signed artifact URLs.
npx skill4agent add shiplightai/agent-skills cloud_v2.shiplight-agent-skills-last-updatenpx -y skills@latest update -y.shiplight-agent-skills-last-update/v1SHIPLIGHT_API_TOKENSHIPLIGHT_API_URLexport SHIPLIGHT_API_URL=https://nova-api.shiplight.aiAuthorization: Bearer $SHIPLIGHT_API_TOKEN.envSHIPLIGHT_API_TOKEN=<token>.env| Error | Action |
|---|---|
| 400 Bad Request | Fix the request body, IDs, or query parameters |
| 401 Unauthorized | Token is missing, invalid, expired, or for the wrong Nova environment |
| 403 Forbidden | Token lacks the required permission |
| 404 Not Found | Run, result, or artifact was not found for this organization |
| 422 Validation | Show the validation message and correct the payload |
| 500 Server Error | Retry only if the operation is idempotent; otherwise report the failure |
$SHIPLIGHT_API_URLcurl -X POST "$SHIPLIGHT_API_URL/v1/local-runs" \
-H "Authorization: Bearer $SHIPLIGHT_API_TOKEN" \
-H "Content-Type: application/json" \
-d @run.json{
"trigger": "local_cli",
"startTime": "2026-05-27T10:00:00.000Z",
"metadata": {
"gitBranch": "main",
"gitCommit": "abc1234",
"gitRepo": "org/repo",
"authorEmail": "dev@example.com",
"ciProvider": "github_actions",
"ciBuildId": "12345",
"ciBuildUrl": "https://github.com/org/repo/actions/runs/12345",
"commitTitle": "Fix checkout flow",
"commitUrl": "https://github.com/org/repo/commit/abc1234",
"prNumber": 42,
"prTitle": "Fix checkout flow",
"prUrl": "https://example.com/pr/42",
"hostname": "runner-1",
"nodeVersion": "v22.0.0"
},
"tests": [
{
"testCaseName": "checkout succeeds",
"testCaseBaseName": "checkout succeeds",
"suiteName": "Checkout",
"file": "tests/checkout.test.yaml",
"tags": ["smoke"],
"suiteTags": ["commerce"],
"baseUrl": "https://app.example.com",
"skip": false,
"slow": false,
"timeout": 30000,
"parameterSetName": "chromium",
"videoMd5": "base64-encoded-md5",
"traceMd5": "base64-encoded-md5"
}
]
}{
"testRunId": 42,
"testCaseResults": [
{
"testCaseName": "checkout succeeds",
"testCaseResultId": 101,
"uploadUrls": {
"video": "https://...",
"trace": "https://...",
"screenshots": {}
},
"s3Uris": {
"video": "s3://...",
"trace": "s3://..."
}
}
]
}gitBranchgitCommitgitRepoauthorEmailcommitTitlecommitUrlciProviderciBuildIdciBuildUrlprTitleprNumberprUrlhostnamenodeVersioncurl -X POST "$SHIPLIGHT_API_URL/v1/local-runs/$TEST_RUN_ID/results/$TEST_CASE_RESULT_ID/screenshot-urls" \
-H "Authorization: Bearer $SHIPLIGHT_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"stepIds":["step-1"],"md5s":{"step-1":"base64-encoded-md5"}}'{
"screenshots": {
"step-1": "https://..."
},
"screenshotS3Uris": {
"step-1": "s3://..."
}
}curl -X POST "$SHIPLIGHT_API_URL/v1/local-runs/$TEST_RUN_ID/results/$TEST_CASE_RESULT_ID/report-url" \
-H "Authorization: Bearer $SHIPLIGHT_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"md5":"base64-encoded-md5"}'{
"reportUrl": "https://...",
"reportS3Uri": "s3://..."
}resultpassedfailedskippedtimedoutflakycurl -X PUT "$SHIPLIGHT_API_URL/v1/local-runs/$TEST_RUN_ID/complete" \
-H "Authorization: Bearer $SHIPLIGHT_API_TOKEN" \
-H "Content-Type: application/json" \
-d @complete-run.json{
"status": "finished",
"endTime": "2026-05-27T10:05:00.000Z",
"totalDuration": 300000,
"results": [
{
"testCaseResultId": 101,
"result": "passed",
"startTime": "2026-05-27T10:00:01.000Z",
"endTime": "2026-05-27T10:00:10.000Z",
"error": null,
"reportS3Uri": "s3://...",
"videoS3Uri": "s3://...",
"traceS3Uri": "s3://...",
"metadata": {}
}
]
}{
"reportUrl": "/run-results/42"
}curl "$SHIPLIGHT_API_URL/v1/local-runs/$TEST_RUN_ID/results/$TEST_CASE_RESULT_ID/artifact-url?type=trace" \
-H "Authorization: Bearer $SHIPLIGHT_API_TOKEN"typereportvideotracescreenshotstepIdcurl "$SHIPLIGHT_API_URL/v1/local-runs/$TEST_RUN_ID/results/$TEST_CASE_RESULT_ID/artifact-url?type=screenshot&stepId=step-1" \
-H "Authorization: Bearer $SHIPLIGHT_API_TOKEN"{
"url": "https://...",
"expiresIn": 3600
}POST /v1/local-runstestRunIdtestCaseResultIdscreenshot-urlsreport-urlPUT /v1/local-runs/{testRunId}/completereportUrlartifact-urltype=reportvideotracescreenshot