blazeDocs

Databases

Create, list, read, rename, expire and delete.

MethodPathNotes
GET/v1/databasesList. No credentials included.
POST/v1/databasesCreate. Returns the connection string.
GET/v1/databases/:idRead one, with credentials.
PATCH/v1/databases/:idRename, or set/clear ttl_seconds.
DELETE/v1/databases/:idPermanent.

Expiry

ttl_seconds names its unit deliberately: guessing wrong should give you a database that lives 24 hours rather than 24 seconds. Send null to clear an expiry; omit the field to leave it untouched.

Clear an expiry
curl -X PATCH https://blaze.crafter.run/v1/databases/$ID \
  -H "Authorization: Bearer $BLAZE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ttl_seconds":null}'

Engines

engine is one of the available engines below. It defaults to postgres.

Create a MongoDB database
curl -X POST https://blaze.crafter.run/v1/databases \
  -H "Authorization: Bearer $BLAZE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"engine":"mongo","name":"my-app"}'

The connection string comes back in the scheme each engine's drivers expect: postgresql://, mysql://, mariadb://, mongodb:// (with tls=true), and rediss://. See MongoDB for its connection options.

PostgreSQLAvailable
MySQLAvailable
MariaDBAvailable
MongoDBAvailable
RedisAvailable
libSQLNot yet

On this page