List all elements
Elements of a selection, sorted; optionally as derivation tree.
Command element.list. Reads the workspace and changes no file.
| Field | Type | Required | Description |
|---|---|---|---|
selection |
selection |
no | Every part given must hold (SR-101 AK2). |
sort |
array of sortKey |
no | Keys in order: ties go to the next key, then to the workspace order (also without sort). hierarchy only first: the list is then the derivation tree, see tree. Without sort, the sort of the saved filter in selection.filter. |
withText |
boolean |
no | Also give the text of each element. Left out for an element without a version, and when its file changed while the list was built (list again). |
limit |
integer |
no | Default: 200. |
offset |
integer |
no | Default: 0. |
Output
Section titled “Output”| Field | Type | Required | Description |
|---|---|---|---|
elements |
array of element |
yes | |
tree |
array of object |
no | Only when sort starts with hierarchy (SR-075 AK2): the place in the derivation tree of each element of elements, in the same order. The list is the tree depth first: each root, then the elements below it. Each element of the selection appears once (spec-frage #354): below the parent of the list that reaches it at the shortest depth, the first in sort order among equals; an element without a parent in the list is a root, and so is the first element in sort order of a cycle that no root reaches. Its other parents are in its relations. |
tree[].id |
uuid |
yes | Element ID: random UUID version 4, lower case, never changes (D-017, SR-002). |
tree[].repository |
string |
yes | Workspace name of the repository of the element. |
tree[].depth |
integer |
yes | 0 for a root, 1 for an element below it, and so on. |
tree[].parent |
object |
no | The element it is shown below, a parent of it by a derivation; left out for a root. It may lie on an earlier page. |
tree[].parent.id |
uuid |
yes | Element ID: random UUID version 4, lower case, never changes (D-017, SR-002). |
tree[].parent.repository |
string |
yes | |
total |
integer |
yes | |
incomplete |
incomplete |
no | True when a result is incomplete because targets are in repositories that are not available locally (SR-006 AK2, SR-036 AK3). |
In the command prompt (Ctrl+Shift+P, macOS ⌘⇧P): the action List all elements.
reqseq element list, with --json for the output as JSON. Its help:
Usage: reqseq element list [options]
Elements of a selection, sorted; optionally as derivation tree.
Options: --with-text Also give the text of each element. Left out for an element without a version, and when its file changed while the list was built (list again). --no-with-text set with-text to false --limit <number> default: 200 --offset <number> default: 0 --input <json|@file|-> command input as JSON: inline, from a file, or from standard input --workspace <path> workspace root (default: nearest folder upwards with reqseq-workspace.yaml) --json print exactly the command output as JSON --yaml print the whole command output as YAML, problems one per line -h, --help show help
Only via --input: selection, sortPOST /v1/commands/element.list on the local API (reqseq serve api), with the input as the JSON body; the answer is the output.
Tool element_list of the MCP server (reqseq mcp), with the input as its arguments.