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. 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
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

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • warning

      removed the request property

    • warning

      removed the request property

    • 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