OSPRIDocs
Developers

Command line: list, start and follow a run

Copy one command at a time. Check the response before continuing.

1. Set your environment

Use a short-lived user token from your approved OAuth sign-in. In Bash or Zsh, read it without displaying it:

export DIMERIQ_BASE_URL='https://dimeriq-staging.ospribrain.com'
read -r -s OSPRI_ACCESS_TOKEN
export OSPRI_ACCESS_TOKEN

Paste your token after the read command, then press Enter. Do not put its literal value in a saved command.

2. Read your runs

curl --fail-with-body --silent --show-error --max-time 30 \
  -H "Authorization: Bearer $OSPRI_ACCESS_TOKEN" \
  "$DIMERIQ_BASE_URL/api/science/jobs?panel=true"

Expected: JSON containing only your accessible jobs. An empty list is valid for a new account. A 401 means the sign-in/token failed; a 403 means access was denied.

3. Start approved test work

Download the public-reference example, review it, and save it as panel.json. It uses selected public phage references, not customer data. Starting a job uses compute.

curl --fail-with-body --silent --show-error --max-time 45 \
  -H "Authorization: Bearer $OSPRI_ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data-binary @panel.json \
  "$DIMERIQ_BASE_URL/api/science/workflow/discovery/start"

Expected: a saved job with an id. Save it before doing anything else. If the connection fails after submission, list your runs before retrying.

4. Read status

RUN_ID='replace-with-returned-id'
curl --fail-with-body --silent --show-error --max-time 30 \
  -H "Authorization: Bearer $OSPRI_ACCESS_TOKEN" \
  "$DIMERIQ_BASE_URL/api/science/jobs/$RUN_ID"

Look at status, then the result's scientific state and scope. Poll every few seconds, not in a tight loop. See pause/resume before interpreting a stopped checkpoint.

When done, remove the token from this shell with unset OSPRI_ACCESS_TOKEN.

On this page