Import a bundle from a .md file, a .zip file, or pasted markdown.
const url = 'https://example.com/api/v1/bundles/import';const form = new FormData();form.append('name', 'example');form.append('file', 'example');form.append('text', 'example');form.append('profile', 'example');form.append('files', 'example');form.append('docs', 'example');form.append('links', 'example');
const options = {method: 'POST'};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/bundles/import \ --header 'Content-Type: multipart/form-data' \ --form name=example \ --form file=example \ --form text=example \ --form profile=example \ --form files=example \ --form docs=example \ --form links=exampleSend exactly one of file or text. In local mode, Speccy writes the bundle to a new folder named name under the folder that Speccy serves (REQ-008).
Request Bodyrequired
Section titled “Request Bodyrequired”object
The bundle folder name. The default comes from the file name or the doc title.
A .md file or a .zip file.
Pasted markdown.
The doc type for a file that names none. Speccy writes the type line into the frontmatter of the imported file.
The files of a dropped folder. Each part’s file name is its path in the folder.
JSON: an array of {path, profile}. The profile of each markdown file; an empty profile is not a spec.
JSON: an array of {from, to, kind}, the links a person confirmed. Speccy writes each into the from doc.
Responses
Section titled “ Responses ”The new bundles. A folder with two or more spec docs gives one bundle per doc.
object
A folder that holds one or more spec docs and their assets.
object
The bundle folder relative to the served folder or the repo root.
The folder name.
The worst state of the bundle’s spec docs, for a list row: not_build_ready when one spec doc is Not Build Ready, then not_reviewed when one has no verdict on its current version, and build_ready only when every spec doc is Build Ready.
The spec docs of the bundle, by path.
One spec doc of a bundle, with its own profile, versions, review runs and verdict.
object
The bundle that holds the spec doc.
The profile of the spec doc.
Where a GitHub bundle comes from, and its draft (REQ-123).
object
The current version has changes that are not on GitHub.
GitHub changed after the draft started.
The path of the spec doc in its bundle.
object
The verdict of the bundle’s latest completed run. It is stale when that run is not on the current version.
object
Lint means only the lint stage ran.
object
Checks in adoption mode (REQ-133).
Open MUST findings.
Open blocking threads. Any makes the verdict Not Build Ready (§8.6 rule 2).
The full review whose AI findings this verdict counts. For a full run, the run itself.
The version the AI review read, when it is older than this verdict’s version.
How many sections changed since the AI review read the doc.
Set when the verdict is stale because a linked bundle has a newer version than the run read (REQ-056).
With stale_reason upstream_changed, the linked spec docs that have a newer version than the run read.
object
The bundle that holds the spec doc.
Why the latest run on the current version failed, when it failed.
The frontmatter keys the main doc does not name, and the values a review used for them (REQ-135). Absent when the doc names both.
object
The one thing the caller must do next on this bundle. Absent when nothing is open. The list carries the kind and the sentence; one bundle also carries the target.
object
What to do, in words, for a button label or a status line.
The key of the tour point to open.
Folders that are not valid bundles, for example with two main docs (REQ-001).
object
Example
{ "items": [ { "source_kind": "local", "visibility": "private", "state": "not_build_ready", "docs": [ { "source_kind": "local", "verdict": { "kind": "lint", "result": "build_ready", "stale_reason": "upstream_changed" }, "status": "draft", "next_action": { "kind": "waiver" } } ] } ]}default
Section titled “default”An error.
RFC 9457 problem details with a stable code.
object
A stable machine-readable error code.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}