Register database
const url = 'https://api.reflexdb.cloud/v1/databases';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"connectionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","mysqlDb":"example","instanceSize":"nano","logLevel":"info","binlogServerId":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.reflexdb.cloud/v1/databases \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "connectionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "mysqlDb": "example", "instanceSize": "nano", "logLevel": "info", "binlogServerId": 1 }'Registers a new database connection. The MySQL password is stored in SSM Parameter Store and never written to the database. Status begins as registered — call /provision to build and deploy.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Parameters for registering a new database instance under an existing connection
object
The connection that provides source MySQL credentials
Display name — must be unique within the connection
Schema to use — must be in the connection’s availableSchemas
MySQL binlog server ID — must be unique across all replicas
Responses
Section titled “ Responses ”A database instance config and its current lifecycle status
A database instance config and its current lifecycle status
object
The connection that provides source MySQL credentials
The MySQL schema on the source server for this instance
Sync mode for this instance
Polling interval in seconds (>= connection minSyncInterval)
ECS task vCPU units (256 = 0.25 vCPU)
ECS task memory in MiB
HTTPS base URL of the running instance
Forced CodeBuild compute tier for this instance’s builds; null = auto-select
AWS region this instance is deployed to
Queued goal — reconciler drives the instance toward this state
Vanity subdomain (Teams+ plan). When set, <value>.reflexdb.cloud resolves to this instance.
Recurring pause/resume schedule (UTC). null when no schedule is configured.
object
HH:MM UTC
HH:MM UTC
0=Sun…6=Sat; empty = every day
A label attached to a database for organisation
object
Example
{ "syncMode": "poll", "logLevel": "info", "status": "registered", "healthStatus": "ok", "instanceSize": "nano", "tags": [ { "color": "gray" } ]}Default Response
object
Example generated
{ "error": "example", "message": "example"}Default Response
object
Example generated
{ "error": "example", "message": "example"}