Docs menu · Reference

Writes a binary value to the selected KV space. If the key already exists, Strata replaces the visible value and records a new version.

Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.

Examples

Store a value, then replace it.

CLI

$ strata kv put setting v1
$ strata kv put setting v2  # replaces the visible value
$ strata kv get setting

Wire

{"key":"c2V0dGluZw==","type":"kv_put","value":"djE="}
{"key":"c2V0dGluZw==","type":"kv_put","value":"djI="}
{"key":"c2V0dGluZw==","type":"kv_get"}

Parameters

NameTypeRequiredDescription
keyBytesyesKey bytes.
valueBytesyesValue bytes.

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

Returns

MutationAck<KvWrite>.

Errors

Invocation

  • CLI: strata kv put
  • Wire type: kv_put

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