--- id: SNAP-1 family: RT-SNAP level: core profiles: [runtime, editor-client] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/rt-snap/snap-1 specification: FlowDrop Workflow Specification 1.0 licence: CC BY 4.0 --- # SNAP-1 — The snapshot API carries two casings, and acceptance is the lenient half *RT-SNAP (Part II) · level: core · profiles: runtime, editor-client · added in 1.0* Envelope keys are snake_case and the snapshot document inside them is camelCase, so `execution_id` and `executionId` are published by the same read one nesting level apart. Consumers read both, and neither spelling is normalised toward the other. ## The rule > **Normative.** This is the rule. > > 1. The snapshot API's envelope-level keys MUST be snake_case. > > 2. The save acknowledgement MUST carry `entity_id` and `execution_id`. > > 3. The delete acknowledgement MUST carry `message` and `execution_id`. > > 4. The list row MUST carry `entity_id`, `execution_id`, `workflow_id`, `status`, `thread_id`, `created`, `changed` and `node_count`. > > 5. The snapshot document published under `data.snapshot` MUST be the snapshot's own camelCase shape, and MUST carry `workflowId`, `executionId`, `nodeStates`, `initialInput`, `iterationCount`, `threadId`, `createdAt` and `updatedAt`. > > 6. The save endpoint MUST accept either spelling in its body. > > 7. The save endpoint MUST normalise what it accepts to the camelCase shape. > > 8. A read MUST always publish the snapshot document in camelCase. > > 9. `node_count` MUST be the number of node states in the snapshot, not a count taken from the raw stored payload. ## What it means The same execution id is spelled two ways one nesting level apart, and neither spelling is the "wrong" one to normalise away. At the envelope level — an acknowledgement, a list row — the key is snake_case. Inside the published snapshot document itself, the same value sits under the camelCase spelling. A consumer that reads one and assumes the other is just a stylistic inconsistency will read the wrong key at the wrong level. The save endpoint is the one asymmetry worth naming directly: it accepts a body in either spelling, but what it hands back — like every read — is always camelCase. Leniency runs one way only. ## Example ```json title="The execution_id field of the save acknowledgement" verdict="saved" "exec_saved" ``` ```json title="The executionId field inside the read snapshot" verdict="read" "exec_get" ``` ```http title="Deleting a snapshot by execution id" verdict="200 deleted" DELETE /api/flowdrop-runtime/snapshot/{execution_id} {"success": true, "data": {"message": "Snapshot deleted", "execution_id": "exec_delete_me"}} ``` ## Why Recorded under [OPEN-23](https://flowdrop.io/spec/rulings/open-23), [OPEN-25](https://flowdrop.io/spec/rulings/open-25). ## Related rules - Names: SNAP-2 - Referenced by: SNAP-2 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.