ATCs

Edit an ATC (full replace of steps and assertions)

Changed on

Bearer atc:write (or cookie session). PUT-style full replace — omitted children are cleared, and so are omitted technique / priority (BK-399: an omitted key stores null = not specified, it does not preserve the previous value). An empty body is a 200 no-op (no version bump, no event). user_story_id, module_id, and slug are immutable. BK-21: edits propagate automatically to every Test that chains the ATC (Tests reference it by id, never copy its content), visible on the Test's next read. The response reports affected_test_count (DISTINCT chaining Tests — a Test that chains the ATC at multiple positions counts once; 0 for a no-op). Emits an atc.updated event carrying the in-transaction affected_test_ids.

patch/api/v1/atcs/{id}

Request

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

Path parameters

idstring uuid required

Headers

X-If-Matchstring

Current version for optimistic locking. A mismatch returns 409. Uses a custom header instead of RFC 7232 If-Match because the Vercel edge intercepts If-Match and rewrites the response to 412 (BK-96); If-Match is still accepted as a fallback on non-Vercel deployments.

Request body

titlestring required

3-200 characters after trimming leading/trailing whitespace (BK-622).

layer'UI' | 'API' | 'Unit' required
technique'Equivalence Partitioning' | 'Boundary Value Analysis' | 'State Transition' | 'Decision Table' | 'Pairwise' | 'null' nullable

Optional test-design technique. Omitted keys are cleared, not merged: sending null or omitting the key stores "not specified" (SQL NULL). Exact display label, case-sensitive, not trimmed.

priority'Critical' | 'High' | 'Medium' | 'Low' | 'null' nullable

Optional ATC priority (distinct from Bug severity). Omitted keys are cleared, not merged: sending null or omitting the key stores "not specified" (SQL NULL). Exact display label, case-sensitive, not trimmed.

tagsstring[]
acceptance_criterion_idsstring[] required

Response

ATC updated (or no-op for an empty body).

versioninteger required

The ATC version after the edit (unchanged on a no-op).

affected_test_countinteger required

DISTINCT Tests that chain this ATC and now reflect the edit. 0 for a no-op.

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the 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

    • 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