neosourceDocs
Search docs

Quarantine a test

POST/api/repos/{owner}/{repo}/quarantine

addQuarantine

Excludes `test_id` from the merge gate. Idempotent on `(repo, test_id)` — re-adding an already-quarantined test only refreshes `reason`. Requires write access on the repository.

Requires authentication using a bearer token or a session cookie — see tokens and scopes.

curl

curl -X POST 'https://neosource.dev/api/repos/OWNER/REPO/quarantine' \
  -H 'Authorization: Bearer $NEOSOURCE_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"test_id":"string"}'

fetch

fetch("https://neosource.dev/api/repos/OWNER/REPO/quarantine", {
  method: "POST",
  headers: {
    Authorization: "Bearer $NEOSOURCE_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"test_id":"string"}),
});

Path parameters

ownerrequired

string

reporequired

string

Request bodyrequired

application/json

AddQuarantineReq

object

Body of `POST /api/repos/{owner}/{repo}/quarantine`.

reason

string | null

test_idrequired

string

Responses

201Test quarantined

application/json

QuarantinedTest

object

One quarantined test on a repo — excluded from the merge gate (P3.3 enforces; this is CRUD only).

created_atrequired

integerint64

reason

string | null

test_idrequired

string

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 400Bad Request — one of: invalid_input
  • 401Authentication required
  • 403Forbidden — one of: forbidden
  • 404Not Found — one of: not_found
  • 409Conflict — one of: already_exists, conflict, non_fast_forward
  • 423Locked — one of: busy
  • 429Rate limited — retry after the `Retry-After` header
  • 500Internal server error
  • 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
  • 504Gateway timeout — the request exceeded the server's handling budget