List the markdown files of an import, with the profile of each and the links Speccy offers.
const url = 'https://example.com/api/v1/bundles/import/preview';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/preview \ --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=exampleRequest 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 docs of the import.
object
object
The type the file names in its frontmatter.
The profile whose headings fit the file best. Absent when none fits.
object
The path of the doc that links.
The path of the doc it links to.
Examplegenerated
{ "docs": [ { "path": "example", "title": "example", "type": "example", "guess": "example" } ], "links": [ { "from": "example", "to": "example", "kind": "example" } ]}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"}