Reads several document/path entries and returns positional item results. Each item records whether the value was found and includes version metadata when present.
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
Read many documents at once.
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
| Name | Type | Required | Description |
|---|---|---|---|
entries | BatchJsonGetEntry[] | yes | Entries to read. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
BatchResult<Maybe<JsonValue>>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.json_document_idinvalid_argument.engine.json_pathinvalid_argument.engine.json_path_too_long
Invocation
- CLI: via
strata command run(no dedicated verb) - Wire type:
json_batch_get