Freeze an annotation plan: validate and select matching nodes, writing nothing
const url = 'http://localhost:11044/api/v1/admin/kg/annotations/dry-run';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"params":{"additionalProperty":"example"},"statement":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/admin/kg/annotations/dry-run \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "params": { "additionalProperty": "example" }, "statement": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional, and never needed: the call always acts as the signed-in principal. Naming the principal changes nothing; naming anyone else is refused with 403.
Request Bodyrequired
Section titled “Request Bodyrequired”The annotation statement to validate and select with, writing nothing: a read prefix, WITH DISTINCT <target> ORDER BY … LIMIT n, then exactly one SET <target>.<property> = <value> on a property the world declares annotatable. params binds the statement’s $name parameters and may be omitted. 409 when the statement falls outside that grammar
An annotation statement to freeze into a plan, writing nothing; the body of POST /admin/kg/annotations/dry-run
object
Values for the statement’s $parameters, by name, resolved when the plan freezes; empty when absent
object
One Cypher annotation statement: a read prefix (MATCH, OPTIONAL MATCH, WITH), then WITH DISTINCT
Example generated
{ "params": { "additionalProperty": "example" }, "statement": "example"}Responses
Section titled “Responses”The frozen plan and the diffs it would write
A frozen annotation plan: what WOULD be written, with nothing written yet.
object
One proposed change per selected node, as it would be written.
One proposed property change, as it would be written.
object
The value the write would set. Null means the write clears the property.
The value before the write, or null when the property is new.
The target’s identity property value. Type depends on the label’s identity property.
The property the write sets; the plan’s allowlisted property, the same on every diff.
When the frozen plan lapses, ISO-8601. Echo it back verbatim.
The node label the statement targets; annotation writes must be allowed on it in the world’s annotatable declarations.
Pass this to /apply or /undo. Single-use and time-limited.
The allowlisted property the statement SETs on each selected node.
How many nodes the statement selected.
Example generated
{ "diffs": [ { "after": "example", "before": "example", "identity": "example", "property": "example" } ], "expiresAt": "example", "label": "example", "planId": "example", "property": "example", "selected": 1}No authenticated principal
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}Annotation writes disabled by feature flag, or username names someone other than the signed-in principal
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}Plan rejected, expired, or frozen for another user
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}
