Jobs
Submit job
post
/v1/jobsParameters
Idempotency-Key
Request body · application/json
moduleverbinputteam
Responses
200
idmoduleverbstateteamIdcreatedAtupdatedAtdeadlineAtstartedAtfinishedAtfailureKind
202
idmoduleverbstateteamIdcreatedAtupdatedAtdeadlineAtstartedAtfinishedAtfailureKind
400
errormessagetypecodeparamnexusminimum
401
errormessagetypecodeparamnexusminimum
403
errormessagetypecodeparamnexusminimum
404
errormessagetypecodeparamnexusminimum
409
errormessagetypecodeparamnexusminimum
422
errormessagetypecodeparamnexusminimum
429
errormessagetypecodeparamnexusminimum
502
errormessagetypecodeparamnexusminimum
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request_error | A field is missing or not valid; the message names it |
| 400 | No `Idempotency-Key`, or `module`, `verb`, `input` or `team` is not valid. `module` is not `<product>/<capability>` (`invalid_request`). A malformed `Idempotency-Key` is `invalid_idempotency_key`. | |
| 401 | authentication_error | No key, or a key Gateway does not accept |
| 403 | role_required | Your role does not have this permission |
| 404 | No registered module is `module`, or it does not declare `verb` (`not_found`). The team named does not exist in this organization (`unknown_team`). | |
| 409 | The `Idempotency-Key`'s first request still runs (`idempotency_in_progress`) or was interrupted (`idempotency_interrupted`). The request does not run again. | |
| 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 | The `Idempotency-Key` named a different job (`idempotency_key_reused`): a resend with another `module`, `verb` or `input`. | |
| 422 | idempotency_key_reused | A resend with a different `module`, `verb` or `input` is a 422 `idempotency_key_reused` |
| 429 | Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap). | |
| 429 | rate_limit_error | Too many requests from this key in a minute |
| 502 | No registered module is `module` and a module did not answer, so it may be that one (`module_unavailable`); try again. |
Example
curl -X POST "$NEXUS_URL/v1/jobs" \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"module": "intelligence/wiki",
"verb": "run",
"input": {
"repo": "https://github.com/nexus-demo/hello-factory"
}
}'Get job
/v1/jobs/{id}Parameters
id
Responses
200
idmoduleverbstateteamIdcreatedAtupdatedAtdeadlineAtstartedAtfinishedAtfailureKind
401
errormessagetypecodeparamnexusminimum
403
errormessagetypecodeparamnexusminimum
404
errormessagetypecodeparamnexusminimum
429
errormessagetypecodeparamnexusminimum
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 job of yours (`not_found`): a job is its creator's and its organization's owners' and admins'. Another member's job, and another organization's, is as absent as a missing one. | |
| 429 | Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap). | |
| 429 | rate_limit_error | Too many requests from this key in a minute |
Example
curl "$NEXUS_URL/v1/jobs/<id>" \
-H "Authorization: Bearer $NEXUS_API_KEY"Cancel job
post
/v1/jobs/{id}/cancelParameters
idIdempotency-Key
Responses
200
idmoduleverbstateteamIdcreatedAtupdatedAtdeadlineAtstartedAtfinishedAtfailureKind
400
errormessagetypecodeparamnexusminimum
401
errormessagetypecodeparamnexusminimum
403
errormessagetypecodeparamnexusminimum
404
errormessagetypecodeparamnexusminimum
409
errormessagetypecodeparamnexusminimum
422
errormessagetypecodeparamnexusminimum
429
errormessagetypecodeparamnexusminimum
Errors
| Status | Code | When |
|---|---|---|
| 400 | A malformed `Idempotency-Key` (`invalid_idempotency_key`). | |
| 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 job of yours (`not_found`): a job is its creator's and its organization's owners' and admins'. Another member's job, and another organization's, is as absent as a missing one. | |
| 409 | The `Idempotency-Key`'s first request still runs (`idempotency_in_progress`) or was interrupted (`idempotency_interrupted`). The request does not run again. | |
| 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 | The `Idempotency-Key` was used for a different request (`idempotency_key_reused`). | |
| 422 | idempotency_key_reused | The Idempotency-Key was used with a different request |
| 429 | Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap). | |
| 429 | rate_limit_error | Too many requests from this key in a minute |
Example
curl -X POST "$NEXUS_URL/v1/jobs/<id>/cancel" \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"Get job result
/v1/jobs/{id}/resultParameters
id
Responses
200
idstateresultfailureKind
401
errormessagetypecodeparamnexusminimum
403
errormessagetypecodeparamnexusminimum
404
errormessagetypecodeparamnexusminimum
429
errormessagetypecodeparamnexusminimum
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 job of yours (`not_found`): a job is its creator's and its organization's owners' and admins'. Another member's job, and another organization's, is as absent as a missing one. | |
| 429 | Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap). | |
| 429 | rate_limit_error | Too many requests from this key in a minute |
Example
curl "$NEXUS_URL/v1/jobs/<id>/result" \
-H "Authorization: Bearer $NEXUS_API_KEY"