greenlight API

Contract-test any live endpoint. Gates go in red. Code comes out. Gates turn green.

GET /gates
List all gates
Returns a list of all gates with their current status and configuration.
Responses
200 List of gates retrieved successfully
{
  "ok": boolean,
  "result": {
    "gates": [{
      "name": string,
      "assertion": string,
      "status": string (red, green, stuck),
      "iterations": integer,
    }],
  },
}
POST /gates
Add a new gate
Create a new gate by providing an assertion in plain language.
Request Body
{
  "assertion": string, // Plain language assertion, e.g., 'GET /health returns 200'
  "name": string, // Optional custom name for the gate
}
Responses
200 Gate created successfully
{
  "ok": boolean,
  "result": {
    "name": string,
    "assertion": string,
    "status": string,
  },
}
GET /status
Get loop status
Returns the current state of the gate execution loop.
Responses
200 Status retrieved successfully
{
  "ok": boolean,
  "result": {
    "loop": {
      "status": string (idle, running, paused),
      "iteration": integer,
    },
  },
}
POST /start
Start the loop
Begin continuous gate execution.
Responses
200 Loop started successfully
POST /pause
Pause the loop
Pause continuous gate execution.
Responses
200 Loop paused successfully