Projects

Patch Project Data

Update project.data at a dot path (ops, write_mode, dry_run, expected_sha256 CAS).

patch/api/projects/{project_id}/data

Request

  • Base URL: https://api.agentstack.tech (the document declares no server; this is the origin it was published from)
  • URL: https://api.agentstack.tech/api/projects/{project_id}/data
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Path parameters

project_idinteger required

Headers

Idempotency-Keystring

Client-generated key to make mutating requests idempotent.

Request body

pathstring nullable

Dotted path into project.data (wins over patches[] when set)

valueunknown
write_modestring nullable

replace | merge | delete | search_replace | fuzzy_replace | unified_diff | append | prepend

allow_shrinkboolean

Allow deliberate shorter string (not read-window write-back)

replacementsobject[] nullable

search_replace pairs on a string leaf (merged into value).

unified_diffstring nullable

Unified diff on a string leaf (fuzzy unless strict_diff=true).

strict_diffboolean nullable

Strict unified_diff apply (no fuzzy fallback).

opsobject[] nullable

Up to 16 directed edit ops on the path leaf (merge, search_replace, insert_after, …).

dry_runboolean

Preview without writing DNA: directed ops or leaf write_mode (search_replace, merge, replace, …) returns leaf_sha256.

expected_sha256string nullable

Optimistic concurrency digest of the leaf before ops.

missingstring nullable

When a path op misses: error | skip.

Response

Successful Response

successboolean
project_idinteger required
pathstring nullable

Primary leaf path (single-leaf); first leaf when batch writes[]

writesobject[] nullable

Per-leaf results for multi-path PATCH (MCP parity)

dry_runboolean nullable
previous_sha256string nullable

Pre-mutation leaf digest; pass as expected_sha256 on commit after dry_run.

leaf_sha256string nullable

Post-preview or post-write leaf digest.

next_actionsobject[] nullable

Suggested MCP/REST commit steps after dry_run (single-leaf CAS v1).

preview_onlyboolean nullable

True when dry_run preview did not persist DNA.

statestring nullable

Mutation receipt state (e.g. previewed).

writeobject nullable

Changes

No recorded changes to this operation across all 1 revision of this API.