REST API¶
The server describes itself at /openapi.json, with interactive
documentation at /docs. This page is the map.
Documents¶
Route |
Does |
|---|---|
|
The open documents, the one to show first, and what the server can do. |
|
A new document: empty, from a document’s JSON ( |
|
The document, its revision (also as |
|
Replace it. Needs |
|
Replace the drawing (KET); species and reactions are derived from it. |
|
Draw structures from |
|
Standard bond lengths and angles for every molecule; a molecule it cannot clean without changing its stereochemistry is left and named in |
|
3D structures for |
|
One writer’s input for several species with one |
|
Inputs for |
|
The document’s runs with their state in vibe-queue. |
|
Shows |
|
Set a compound number, multiplicity or name. |
|
Formula, masses, identifiers and checked name per species. |
|
The document as a file; |
|
Write it back to the file the server opened it from. |
|
Close it. |
Every write names the revision it is based on: If-Match on PUT, a
revision field on the others. A stale write answers 409 (412 for PUT)
with the current revision; read the document again and retry. Writes also
take actor (human, agent or system) and client (for example rest
or mcp), which go into the document’s provenance.
Without storing anything¶
Route |
Does |
|---|---|
|
|
|
A posted document with its drawing cleaned, and how many molecules were. |
|
3D conformers for one |
|
The report for a posted document. |
|
A posted document as a file. |
|
Whether a JSON value is a valid document, with every problem. |
|
Whether vibe-queue is installed and serving, and which programs it can run. |
|
Cancel a run; 409 when it has finished. |
|
The document’s JSON schema. |
|
The input writers; see input writers. |
Binary data, a QVF archive, goes into data base64-encoded with
"encoding": "base64" (on POST /api/documents, /import and /convert).
GET /api/session says whether QVF is available ("qvf").
Refusals answer 422 with the reasons, under detail.reasons or
detail.errors. A figure export on a machine without the drawing libraries
(see installation) answers 503, with the fix in
detail.reasons.