/api/* on your deployment. It authenticates with that deployment’s account tokens. 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 athttp://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
"object":"list" and a data array. Find the new reading by its indicator, value, and time. The demo also contains seeded readings.Accounts and demo codes
POST /api/data writes to the account that the token represents.
The demo code is for a local example. Before accepting real records, follow Deploy on a Server to remove demo accounts and codes.