Change a diagram
diagram_editIdempotent
Changes a saved diagram as a new revision; old revisions are kept. Give baseRevision (the revision you last read), a one-line message, and ops (typed operations, https://zindex.ai/schemas/ops.schema.json), mermaid (the whole diagram edited from view mermaid; only differences apply), restoreRevision (an earlier version back), or brief. An edit with an error saves nothing; one that changes nothing returns noop. requestId makes a retry return the first result. A conflict lists what changed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The diagram's id or key | |
| ops | No | ||
| brief | No | Replace the brief; null removes it | |
| mermaid | No | The whole diagram as Mermaid; not with ops or restoreRevision | |
| message | Yes | One line on what the edit does and why | |
| requestId | No | Your id for this edit, e.g. a UUID | |
| baseRevision | Yes | ||
| restoreRevision | No | A revision number, or { asOf } for the version current at that instant |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| key | No | ||
| hash | Yes | ||
| noop | No | ||
| chain | Yes | ||
| changed | No | ||
| created | No | ||
| replayed | No | ||
| revision | Yes | ||
| warnings | Yes |