JSON commands

16 commands. Each entry gives the invocation and an example, in the interface you pick; open the details for parameters, return shape and error codes.

batch_delete

Delete multiple JSON documents or paths in one itemwise batch.

db.json.delete_many(entries: 'Any') -> 'BatchResult'

Deletes multiple document/path entries and returns one positional mutation result per entry. Missing documents and paths are represented as no-op item results; applied items share one engine commit.

To see the complete help for this command, run:

help(db.json.delete_many)

Example

_ = db.json.set_many([{"key": "a", "path": "$", "value": {"v": 1}}])_ = db.json.delete_many([{"key": "a", "path": "$"}])db.json.exists("a")
View details →

batch_exists

Check existence for multiple JSON documents.

No CLI or Python spelling in this release. Wire type json_batch_exists.

Checks several JSON documents and returns positional boolean status values. The response preserves the input order.

View details →

batch_get

Read multiple JSON values by document and path.

db.json.get_many(entries: 'Any') -> 'list[Any]'

Reads several document/path entries and returns positional item results. Each item records whether the value was found and includes version metadata when present.

To see the complete help for this command, run:

help(db.json.get_many)

Example

_ = db.json.set_many([{"key": "a", "path": "$", "value": {"v": 1}}, {"key": "b", "path": "$", "value": {"v": 2}}])db.json.get_many([{"key": "a", "path": "$"}, {"key": "b", "path": "$"}])
View details →

batch_set

Set multiple JSON values in one itemwise batch.

db.json.set_many(entries: 'Any') -> 'BatchResult'

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.

To see the complete help for this command, run:

help(db.json.set_many)

Example

_ = db.json.set_many([{"key": "a", "path": "$", "value": {"v": 1}}, {"key": "b", "path": "$", "value": {"v": 2}}])db.json.get_many([{"key": "a", "path": "$"}, {"key": "b", "path": "$"}])
View details →

count

Count visible JSON documents.

strata json count

Counts visible JSON documents in the selected branch and space, optionally constrained by a document key prefix.

To see the complete help for this command, run:

strata json count --help

Example

strata json set a $ {"v":1}strata json set b $ {"v":2}strata json count
View details →

delete

Delete a whole JSON document or one path inside it.

strata json delete

Deletes the root path `$` to remove the whole document, or a nested path to remove one field or array element. Missing documents and paths produce a no-op delete acknowledgement rather than an error.

To see the complete help for this command, run:

strata json delete --help

Example

strata json set temp $ {"x":1}strata json delete temp $strata json exists temp
View details →

exists

Check whether one JSON document exists.

strata json exists

Returns a boolean status for one JSON document key without loading the stored document.

To see the complete help for this command, run:

strata json exists --help

Example

strata json set user $ {"name":"alice"}strata json exists userstrata json exists absent
View details →

get

Read the current or historical JSON value at a document path.

strata json get

Reads the JSON value at a path inside a document. Current reads return the value with commit metadata; passing a timestamp returns the bare value visible at that point in time. A missing document or path is a found-false result, distinct from a stored JSON null.

To see the complete help for this command, run:

strata json get --help

Example

strata json set user $ {"age":30,"name":"alice"}strata json get user $strata json get user $.namestrata json get absent $
View details →

history

Read retained version history for one JSON document.

strata json history

Returns retained full-document history rows for a JSON document, newest first, including delete tombstones. A document with no retained history maps to an optional-read result.

To see the complete help for this command, run:

strata json history --help

Example

strata json history absent
View details →

list

List JSON document keys with optional prefix filtering.

strata json list

Lists visible JSON document keys in byte order. Prefix, cursor, limit, and timestamp parameters constrain the page returned by the executor.

To see the complete help for this command, run:

strata json list --help

Example

strata json set user:1 $ {"v":1}strata json set user:2 $ {"v":2}strata json set other $ {"v":3}strata json list --prefix user:
View details →

sample

Sample visible JSON documents.

strata json sample

Returns a bounded sample of visible JSON documents plus the total matching count. Useful for inspecting document shape before writing queries or indexes.

To see the complete help for this command, run:

strata json sample --help

Example

strata json set a $ {"v":1}strata json set b $ {"v":2}strata json set c $ {"v":3}strata json sample
View details →

scan

Scan JSON documents with values and version facts.

strata json scan

Scans visible JSON documents starting at an optional document key. Each item includes the key, full document value, and commit metadata exposed by the executor output.

To see the complete help for this command, run:

strata json scan --help

Example

strata json set a $ {"v":1}strata json set b $ {"v":2}strata json scan
View details →

set

Set a JSON value at a document path, creating the document when missing.

strata json set

Writes a JSON value at a path inside a document, creating the document and any missing intermediate objects when needed. Setting the root path `$` replaces the whole document; setting a nested path like `$.profile.name` updates one field and records a new document version.

To see the complete help for this command, run:

strata json set --help

Example

strata json set user $ {"age":30,"name":"alice"}strata json get user $
View details →

Indexes

index create

Create a JSON secondary index on a field path.

strata json index create

Creates a secondary index over one JSON field path with a numeric, tag, or text kind. Existing documents are indexed at creation and future writes maintain the index automatically. The current wire response is a transitional bare index definition.

To see the complete help for this command, run:

strata json index create --help

Example

strata json index create by_name $.name --index-type tagstrata json index list
View details →

index drop

Drop a JSON secondary index by name.

strata json index drop

Drops the named JSON secondary index and its stored entries. Documents are unaffected. The current wire response is a transitional boolean status.

To see the complete help for this command, run:

strata json index drop --help

Example

strata json index create by_name $.name --index-type tagstrata json index drop by_namestrata json index list
View details →

index list

List JSON secondary indexes.

strata json index list

Lists JSON secondary index definitions in the selected branch and space, including each index's field path and kind.

To see the complete help for this command, run:

strata json index list --help

Example

strata json index create by_name $.name --index-type tagstrata json index list
View details →