Fix runs
Create cloud run
post
/v1/cloud/runsParameters
Idempotency-Key
Request body · application/json
repoissue
Responses
200
idstaterepoissuepullRequestnumberurl
errorcodemessage
createdAtupdatedAt
202
idstaterepoissuepullRequestnumberurl
errorcodemessage
createdAtupdatedAt
400
402
403
422
429
503
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request_error | A field is missing or not valid; the message names it |
| 400 | The body is not `{ repo, issue }`, `repo` is not a GitHub repository's URL (`invalid_repo`), `issue` is 0 (`invalid_issue`), or the `Idempotency-Key` is missing. | |
| 401 | authentication_error | No key, or a key Gateway does not accept |
| 402 | budget_exceeded | Nothing covers 15 minutes of the run's sandbox (`budget_exceeded`), or the organization is past due (`payment_past_due`). The refusal is recorded. |
| 403 | role_required | Your role does not have this permission |
| 409 | idempotency_in_progress | A request with the same Idempotency-Key is still running |
| 409 | idempotency_interrupted | The first request with this Idempotency-Key was cut off and may have run in part |
| 422 | This `Idempotency-Key` named another run (`idempotency_key_reused`). | |
| 422 | idempotency_key_reused | The Idempotency-Key was used with a different request |
| 429 | The person has two runs going (`fix_runs_busy`); try again after `Retry-After`. | |
| 429 | rate_limit_error | Too many requests from this key in a minute |
| 503 | Fix runs are off on this Gateway (`fix_runs_unavailable`): they need `NEXUS_FIX_RUNS=on`, a provider account (`BOAT_API_KEY`), the job worker (`NEXUS_JOB_WORKER`) and a database. The route still mounts. |
Example
curl -X POST "$NEXUS_URL/v1/cloud/runs" \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"repo": "https://github.com/nexus-demo/hello-factory",
"issue": 1
}'Get cloud run
/v1/cloud/runs/{id}Parameters
id
Responses
200
idstaterepoissuepullRequestnumberurl
errorcodemessage
createdAtupdatedAt
404
503
Errors
| Status | Code | When |
|---|---|---|
| 401 | authentication_error | No key, or a key Gateway does not accept |
| 403 | role_required | Your role does not have this permission |
| 404 | not_found | Nothing matches the path in your organization |
| 404 | No such run of the caller's person (`not_found`). | |
| 429 | rate_limit_error | Too many requests from this key in a minute |
| 503 | Fix runs are off on this Gateway (`fix_runs_unavailable`): they need `NEXUS_FIX_RUNS=on`, a provider account (`BOAT_API_KEY`), the job worker (`NEXUS_JOB_WORKER`) and a database. The route still mounts. |
Example
curl "$NEXUS_URL/v1/cloud/runs/<id>" \
-H "Authorization: Bearer $NEXUS_API_KEY"