Docs menu · Reference

Reads several KV keys and returns positional item results. Each item records whether the corresponding key was found and includes value 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 keys at once; a missing key comes back as null.

CLI

$ strata command run --command-json '{"entries":[{"key":"YQ==","value":"MQ=="},{"key":"Yg==","value":"Mg=="}],"type":"kv_batch_put"}'
$ strata command run --command-json '{"keys":["YQ==","Yg==","bWlzc2luZw=="],"type":"kv_batch_get"}'

Wire

{"entries":[{"key":"YQ==","value":"MQ=="},{"key":"Yg==","value":"Mg=="}],"type":"kv_batch_put"}
{"keys":["YQ==","Yg==","bWlzc2luZw=="],"type":"kv_batch_get"}

Parameters

NameTypeRequiredDescription
keysBytes[]yesKeys to read.

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

Returns

BatchResult<Maybe<Bytes>>.

Errors

Invocation

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

agents: this page as markdown → /docs/reference/kv/batch_get.md