Running SQL
Query over HTTP, without a driver.
curl -X POST https://blaze.crafter.run/v1/databases/$ID/query \
-H "Authorization: Bearer $BLAZE_KEY" \
-H "Content-Type: application/json" \
-d '{"sql":"select now(), version()"}'Queries run as that database's own role, so they reach nothing else on the instance. Statements time out after 30s and at most 500 rows come back.
For a MongoDB database, send one mongosh-style command in sql instead, for example db.orders.find({ status: 'paid' }).limit(5). Documents come back as rows of their top-level fields. See MongoDB for the syntax and the confirm field.
Read ok before rows
A SQL error returns 200 with "ok": false, not a 4xx. The HTTP call succeeded; the SQL did not. Collapsing the two would make clients retry transport failures and syntax errors identically, so read ok before trusting rows.