Import ReqIF file
Import a ReqIF 1.2 file through a saved mapping, all or nothing: creates an element per object and reports losses. Each element keeps its origin (source, source IDENTIFIER, import date, delivery, import version), which no other command writes. A repeated delivery of the same source updates the elements of the earlier one in place (matched by source and source IDENTIFIER) and only lists the dropped ones; an element changed locally and in the delivery is a conflict that needs take or keep, else the import is refused (reqif.conflict).
Command reqif.import. Writes files in the working tree, never to Git. It is refused while the workspace is read-only. Creates and changes elements, and no change can be checked against a missing or faulty metamodel.
| Field | Type | Required | Description |
|---|---|---|---|
file |
localPath |
yes | A file or folder on the local machine, relative or absolute. CLI: relative to the current folder (the CLI makes it absolute before the call); API and MCP: relative to the workspace root, and only inside the repositories of the workspace, also after links are followed; ~ is not expanded (SR-142, ADR-0009). |
delivery |
string |
yes | |
mapping |
localPath |
no | Needed unless the file comes from ReqSeq (REQ-IF-TOOL-ID reqseq), which is mapped one to one. |
source |
string |
no | Source name for a file of ReqSeq without mapping; default the header TITLE. |
take |
array of elementRef |
no | Conflicts for which the delivery is taken: an exact source IDENTIFIER, else an element among the conflicts. |
keep |
array of elementRef |
no | Conflicts for which the local element is kept: an exact source IDENTIFIER, else an element among the conflicts. |
Output
Section titled “Output”| Field | Type | Required | Description |
|---|---|---|---|
created |
array of reqifObject |
yes | New elements. |
updated |
array of reqifObject |
yes | Elements of an earlier delivery the delivery was written into (changed, taken, or a title, property or relation that differed). |
kept |
array of reqifObject |
yes | Conflicts in keep: content left, only the origin written. |
dropped |
array of reqifObject |
yes | Elements of the source whose object the file no longer has; not changed. |
losses |
array of reqifLoss |
yes | |
files |
array of string |
yes | |
problems |
array of problem |
no |
In the command prompt (Ctrl+Shift+P, macOS ⌘⇧P): the command Import ReqIF file.
reqseq reqif import, with --json for the output as JSON. Its help:
Usage: reqseq reqif import <file> <delivery> [options]
Import a ReqIF 1.2 file through a saved mapping, all or nothing: creates anelement per object and reports losses. Each element keeps its origin (source,source IDENTIFIER, import date, delivery, import version), which no othercommand writes. A repeated delivery of the same source updates the elements ofthe earlier one in place (matched by source and source IDENTIFIER) and onlylists the dropped ones; an element changed locally and in the delivery is aconflict that needs take or keep, else the import is refused (reqif.conflict).
Options: --file <value> instead of the argument <file> --delivery <value> instead of the argument <delivery> --mapping <value> Needed unless the file comes from ReqSeq (REQ-IF-TOOL-ID reqseq), which is mapped one to one. --source <value> Source name for a file of ReqSeq without mapping; default the header TITLE. --take <value> Conflicts for which the delivery is taken: an exact source IDENTIFIER, else an element among the conflicts. repeatable --keep <value> Conflicts for which the local element is kept: an exact source IDENTIFIER, else an element among the conflicts. repeatable --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 helpPOST /v1/commands/reqif.import on the local API (reqseq serve api), with the input as the JSON body; the answer is the output.
Tool reqif_import of the MCP server (reqseq mcp), with the input as its arguments.