Docs menu · Reference

Writes multiple document/path/value entries using the executor batch contract. Valid items share one engine commit; entries targeting the same document are merged in order into a single new document version.

Itemwise batches return one positional item result per input item. The outer batch status summarizes whether all, some, or none of the items succeeded.

Examples

Write many documents in one commit.

CLI

$ strata command run --command-json '{"entries":[{"key":"a","path":"$","value":{"v":1}},{"key":"b","path":"$","value":{"v":2}}],"type":"json_batch_set"}'
$ strata command run --command-json '{"entries":[{"key":"a","path":"$"},{"key":"b","path":"$"}],"type":"json_batch_get"}'

Wire

{"entries":[{"key":"a","path":"$","value":{"v":1}},{"key":"b","path":"$","value":{"v":2}}],"type":"json_batch_set"}
{"entries":[{"key":"a","path":"$"},{"key":"b","path":"$"}],"type":"json_batch_get"}

Parameters

NameTypeRequiredDescription
entriesBatchJsonEntry[]yesEntries to set.

Plus the optional scope: branch and space (default to the session branch and the "default" space).

Returns

BatchResult<JsonMutationItem>.

Errors

Invocation

  • CLI: via strata command run (no dedicated verb)
  • Wire type: json_batch_set

agents: this page as markdown → /docs/reference/json/batch_set.md