json
index.list
List JSON secondary indexes.
strata json index listdb.json.list_indexes() -> 'list'wire json_list_indexes
Lists JSON secondary index definitions in the selected branch and space, including each index's field path and kind.
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 index list --helphelp(db.json.list_indexes)
Example
List secondary indexes.
strata json index create by_name $.name --index-type tagstrata json index list
_ = db.json.create_index("by_name", "$.name", index_type="tag")[i.name for i in db.json.list_indexes()]
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| branch | string or null | no | Target branch. Defaults to the executor handle branch. |
| space | string or null | no | Target product space. Defaults to `"default"`. |
Returns
Page<JsonIndexDefinition, String>
- dataobject
Shared pagination continuation facts.
- typestring
Errors
Recover by code. Retry policy and commit outcome come from the shipped error registry.
| Code | Retry | Commit outcome |
|---|---|---|
| failed_precondition.engine.runtime_closed | never | not_started |
| not_found.engine.branch | never | not_applicable |
| invalid_argument.engine.product_space | never | not_started |