OSPRIDocs
Developers

Node.js: a small working client

Use the standard library and keep control of every write.

Before you start

Node.js 22 or newer. No extra packages. Complete authentication and set DIMERIQ_BASE_URL and OSPRI_ACCESS_TOKEN as shown in the command-line guide.

Download dimeriq.mjs and the reviewed panel.json. The script uses HTTPS, a timeout and no automatic write retries.

Read first

node dimeriq.mjs list-runs
node dimeriq.mjs get-run YOUR_RUN_ID
node dimeriq.mjs candidates YOUR_RUN_ID

Expected: JSON with your accessible records. Keep the run's inputs, result scope and evidence when building a report. The candidate example requests the first 20 candidates; the API supports offset and limit for more.

Start approved work

node dimeriq.mjs start-panel panel.json

Save the returned id. A timeout does not prove the job failed to start.

Pause and resume

node dimeriq.mjs pause YOUR_RUN_ID
node dimeriq.mjs get-run YOUR_RUN_ID
node dimeriq.mjs resume YOUR_RUN_ID

Wait for the saved STOPPED checkpoint before resuming. Resume returns a new linked execution ID. Read the lifecycle rules.

Save a decision

Put the documented job_id, candidate_id, decision, note and decision_id in a reviewed JSON file. Then run:

node dimeriq.mjs save-decision decision.json

Reuse a decision ID for a retry of that same decision. Read it back before telling someone it was saved.

On this page