Show facets
Types, statuses and property values of the elements of a selection, with counts, to choose a filter from.
Command element.facets. Reads the workspace and changes no file.
| Field | Type | Required | Description |
|---|---|---|---|
selection |
selection |
no | Every part given must hold (SR-101 AK2). Without it, every element. |
maxValues |
integer |
no | A property of kind text, number or date gives its values only when it has at most this many distinct values in the whole workspace and at least one of them is shared by two elements; otherwise it is free text, found with element.search (SR-068). Choice and relation properties always give their values. Default: 30. |
Output
Section titled “Output”| Field | Type | Required | Description |
|---|---|---|---|
total |
integer |
yes | Elements in the selection. |
types |
array of object |
yes | The types of the selected elements as written in the files, with the number of elements of exactly this type (an element of a subtype is not counted under its parent): types of the metamodel in metamodel order with their name, then other type keys in store order (name = key). Types without a selected element are not listed (SR-118). |
types[].key |
string |
yes | |
types[].name |
string |
yes | |
types[].count |
integer |
yes | |
statuses |
array of object |
yes | The statuses of the selected elements as written in the files, with the number of elements: statuses of the metamodel in metamodel order, then other values in store order. Elements without status are not counted. |
statuses[].key |
string |
yes | |
statuses[].count |
integer |
yes | |
properties |
array of object |
yes | Every property that a type of a selected element has, in the order of the property definitions of the metamodel. Keys no type has (SR-016) are not listed. The counts and values are those of all selected elements, as the filter conditions read them (any type, SR-069): an element whose type lacks the property counts by the value its file holds (usually none). |
properties[].key |
key |
yes | Fixed metamodel key of a type, property, relation kind or status value. Readable English, lower case, dashes (D-043, SR-010 AK2). |
properties[].name |
string |
yes | |
properties[].kind |
one of "text", "number", "date", "choice", "relation" |
yes | |
properties[].count |
integer |
yes | Selected elements that have some value. |
properties[].missing |
integer |
yes | Selected elements that have no value (absent, null or []); the elements { property, op: "missing" } selects. |
properties[].distinct |
integer |
yes | Distinct values the property can be filtered on (for a relation property: distinct available targets). Free text without values counts only up to maxValues + 1, see distinctCapped. |
properties[].distinctCapped |
true |
no | Only for free text: there are more distinct values than maxValues, and distinct stopped counting at maxValues + 1. |
properties[].values |
array of object |
no | Left out for free text (see maxValues). Choices: in metamodel order, then other values as written. Relation targets: by title ignoring case, then short ID. Others: numbers ascending, then texts ignoring case, then booleans. Each value is what a property condition takes with op eq and selects exactly the elements counted: for a relation target its short ID; a choice stored under a name the condition would map to another key, or one that names several choices, is not given. Targets that are not available are left out (a condition cannot name them). |
properties[].values[].value |
string or number or boolean |
yes | |
properties[].values[].count |
integer |
yes | Selected elements that have this value. |
properties[].values[].name |
string |
no | Display name of a choice. |
properties[].values[].title |
string |
no | Title of a relation target; left out when it has none. |
properties[].values[].identifier |
string |
no | Identifier of a relation target, when it has one. |
incomplete |
incomplete |
yes | 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 command Show facets.
reqseq element facets, with --json for the output as JSON. Its help:
Usage: reqseq element facets [options]
Types, statuses and property values of the elements of a selection, with counts,to choose a filter from.
Options: --max-values <number> A property of kind text, number or date gives its values only when it has at most this many distinct values in the whole workspace and at least one of them is shared by two elements; otherwise it is free text, found with element.search (SR-068). Choice and relation properties always give their values. default: 30 --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: selectionPOST /v1/commands/element.facets on the local API (reqseq serve api), with the input as the JSON body; the answer is the output.
Tool element_facets of the MCP server (reqseq mcp), with the input as its arguments.