Skip to main content
The self-hosted engine exposes /api/* on your deployment. It uses that deployment’s account tokens, rather than Cloud mb_live_* keys. The example below uses the local Docker demo and its published demo sign-in code. For the complete route and request schema, open http://localhost:18060/docs while the server is running.

First local API request

Start the Docker demo, then use a second terminal. The example runs against your own machine at http://localhost:18060.
1

Get a demo account token

Exchange the demo email and code for an access token:
Copy data.access_token from the response into your shell:
2

Write one reading

Send a structured record to the account represented by the token:
A successful response includes "status":"ok" and "ingested":1. Check standardized to see whether the reading received a code.
3

Read the account records

The response has "object":"list" and a data array. Find the new reading by its indicator, value, and time. The demo also contains seeded readings.

Cloud and local requests

The local POST /api/data accepts a records array and returns coding information, but it authenticates with a deployment account token. Cloud uses /v1/data, an mb_live_* key, a user Subject key, and a retention setting. On a self-hosted deployment, records belong to the signed-in account; user and retention do not control tenancy or expiry. See the Cloud quickstart for that contract. The demo code is for a local example. Before accepting real records, follow Deploy on a Server to remove demo accounts and codes.