Skip to content

Get element

One element with text, properties, relations, version (and on request its date), hints, and which variants replace or exclude it.

Command element.get. Reads the workspace and changes no file.

Field Type Required Description
ref elementRef yes UUID, short ID or identifier (e.g. SR-036), any case; several matches give ref.ambiguous.
view view no core, a variant ID, or absent for all. A variant’s view: the core requirements it neither excludes nor replaces, plus those valid for it; elements without validity property are in every view (SR-043).
versionDate boolean no Also give the date of the version (versionDate, D-013, ADR-0005), read from the Git history. Without it no git runs and versionDate is left out, so opening an element stays fast (SR-082 AK3); the app asks for the date in a second call. Default: false.
hintDates boolean no Date only the outdated relations and inline references and the changed core requirements of replacements among the hints (relation.outdated, variant.core-changed: storedDate, currentDate and both dates in the message, D-013, ADR-0005), not the version of the element itself. Git reads only the histories of their targets, and none when the element has no outdated relation; the app asks for it in a second call after the element is shown, only for an element with such hints (SR-110 AK2, SR-082 AK3). versionDate dates these hints too. Default: false.
repository string no Which of the elements ref names is meant: the workspace name of its repository, as details.candidates of ref.ambiguous give it (for example one copy of a file whose UUID another file shares, SR-088; #255). Only the elements ref names count; when none of them lies there, the error is ref.unknown with them as details.candidates.
file relativePath no Which of the elements ref names is meant: its file, relative to its repository, as details.candidates of ref.ambiguous give it (#255). Give repository too when the same path is in several repositories; when several elements are still left, the error is ref.ambiguous with them.
Field Type Required Description
element element yes Text, properties, version and, with the input versionDate, its date (versionDate, D-013, ADR-0005: the committer date in UTC of the newest commit that started this version; null for content no commit has and when Git cannot tell, including a git call that timed out; left out without the input), the own relations, the successors of a superseded element (SR-072 AK3), the hints of the element (none while the metamodel is not valid; also variant.superseded-in-validity, SR-040 AK3, variant.target-not-core for a replacement or exclusion of the element that names no core requirement, SR-041 AK8, the outdated relations and inline references of the element, relation.outdated, and the changed core requirements of its replacements, variant.core-changed (SR-045), at a variant the core requirements changed or new since its newest baseline, variant.core-changed-since-baseline and variant.core-new-since-baseline (SR-103), SR-026 AK3, whose messages name the dates of both versions only with the input versionDate or hintDates, and metamodel.meaning-unassigned when no property has the meaning title) and readOnly, always given (unknown type, invalid metamodel or a repository folder that cannot be written). An element with a value that counts and has no normal form (.inf, .nan, ADR-0005) comes without version and versionDate, with a file.faulty warning last in its hints that says why (#276). The incoming relations of every kind: trace.neighbourhood with direction: down. verification, for an element whose type has the meaning requirement: its verification status in each view it is in by the view rule (SR-043, SR-047 AK3), as evidence.status gives it (SR-031), with the indirect verification and the children that are missing (SR-034). validation: its validation status (SR-038), for every need and for any other element with a validation record, separate from verification. replacedBy and excludedBy, for a core requirement: the variants that replace it (with the replacing requirement) and those that exclude it (SR-046 AK3).
fileSha256 fileSha256 yes Of the file this answer was read from, for expectedFileSha256 of element.update (SR-106).
names array of elementName no The elements the element names by UUID only, each once in the order first named: the variants of validity, replacedBy and excludedBy, the replacements and the views of verification (SR-046 AK1/AK2, SR-047 AK3, #588). Left out when it names none.
incomplete incomplete no A repository of the workspace is not here (SR-006 AK2): replacements, exclusions and records stored there are missing.

In the command prompt (Ctrl+Shift+P, macOS ⌘⇧P): the action Go to element or buffer. Key: Ctrl+P (macOS ⌘P).

reqseq element get, with --json for the output as JSON. Its help:

Usage: reqseq element get <ref> [options]
One element with text, properties, relations, version (and on request its date),
hints, and which variants replace or exclude it.
Options:
--ref <value> instead of the argument <ref>
--view <value>
--version-date Also give the date of the version (`versionDate`,
D-013, ADR-0005), read from the Git history. Without
it no git runs and `versionDate` is left out, so
opening an element stays fast (SR-082 AK3); the app
asks for the date in a second call. default: false
--no-version-date set version-date to false
--hint-dates Date only the outdated relations and inline references
and the changed core requirements of replacements
among the hints (`relation.outdated`,
`variant.core-changed`: `storedDate`, `currentDate`
and both dates in the message, D-013, ADR-0005), not
the version of the element itself. Git reads only the
histories of their targets, and none when the element
has no outdated relation; the app asks for it in a
second call after the element is shown, only for an
element with such hints (SR-110 AK2, SR-082 AK3).
`versionDate` dates these hints too. default: false
--no-hint-dates set hint-dates to false
--repository <value> Which of the elements ref names is meant: the
workspace name of its repository, as
details.candidates of ref.ambiguous give it (for
example one copy of a file whose UUID another file
shares, SR-088; #255). Only the elements ref names
count; when none of them lies there, the error is
ref.unknown with them as details.candidates.
--file <value> Which of the elements ref names is meant: its file,
relative to its repository, as details.candidates of
ref.ambiguous give it (#255). Give repository too when
the same path is in several repositories; when several
elements are still left, the error is ref.ambiguous
with them.
--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

POST /v1/commands/element.get on the local API (reqseq serve api), with the input as the JSON body; the answer is the output.

Tool element_get of the MCP server (reqseq mcp), with the input as its arguments.