Runs

Start a manual Run of a Test in a chosen environment

Changed on

Bearer run:execute (or cookie session). Transactional create via one SECURITY DEFINER RPC: snapshots the Test's ATC chain into run_atcs/run_steps (each pending), validates the environment belongs to the Test's Project and that the Test has ≥1 executable step, and enforces a 24h same-token idempotency window. Cookie sessions run as human; PAT callers may declare agent / ci. Returns 201 on create, 200 when the 24h same-token window returned an existing Run.

post/api/v1/runs

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/v1/runs
  • Auth: one of:
    • API key in cookie sb-fmbpikzpkafptqximhxn-auth-token
    • HTTP bearer

Headers

Idempotency-Keystring required

Required. 8–128 chars, [a-zA-Z0-9_-]. The HTTP request-replay guard: a replay with the same key and payload returns the stored response; the same key with a different payload returns 409 conflict. Distinct from the domain start_token (the per-Test 24h window). Window: 24h.

Request body

test_idstring uuid required

The Test to run.

environment_idstring uuid required

A configured project_environments row belonging to the Test's Project.

executor_mode'human' | 'agent' | 'ci'

Cookie sessions are always human (any supplied value is ignored). Bearer (PAT) callers may declare agent / ci; defaults to human.

start_tokenstring

Domain idempotency token (distinct from the Idempotency-Key header). A same (test_id, start_token) within 24h returns the existing Run (HTTP 200). Omit it to mint a fresh one server-side (always a new Run).

Response

Replay: the same (test_id, start_token) within 24h returned the existing Run.

Changes

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status