Skip to main content

Publish Test Plan

POST 

/test-plans

Publish a new plan name at version 1, with every reference resolved up front.

A name already published in this workspace is a 409, not its next version: the two are different intentions, and only one of them should be reachable by getting a name wrong. Editing that plan means addressing it through publish_test_plan_version below.

response_model_exclude_none=True so the plan a caller reads back is shaped like the plan that was stored: plan_body dumps with exclude_none=True, and rendering a key the author never wrote as an explicit null would invite them to fill it in.

Idempotency-Key is required — every caller of this route is expected to generate one per call (this SDK does so transparently; see publish_test_plan's docstring), so there is no caller-facing benefit to making it optional, only a gap for a caller that forgets it. A retry reusing the same key returns that version's outcome (replayed=True, Idempotency-Replayed: true) instead of storing a new one; reusing the key for a plan whose content differs raises 409, so a key can't silently discard what it was first used for.

Request​

Responses​

Successful Response