json

sample

Sample visible JSON documents.

strata json sample

wire 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.

Paginated responses use opaque cursors. Clients should pass the returned cursor back to the same command shape and must not parse cursor contents.

To see the complete help for this command, run:

strata json sample --help

Example

A representative sample plus the total population size.

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

Parameters

NameTypeRequiredDescription
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
countinteger or nullnoOptional sample count. Defaults to 10.
prefixstring or nullnoOptional document key prefix.
spacestring or nullnoTarget product space. Defaults to `"default"`.

Returns

SamplePage<JsonSampleItem>

  • dataobject

    Shared pagination continuation facts.

  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

← All 16 JSON commands

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