Skip to content

Register database

POST
/databases
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.

Media type application/json
CreateDatabaseBody

Parameters for registering a new database instance under an existing connection

object
connectionId
required

The connection that provides source MySQL credentials

string format: uuid
name
required

Display name — must be unique within the connection

string
>= 1 characters <= 100 characters
mysqlDb
required

Schema to use — must be in the connection’s availableSchemas

string
>= 1 characters
instanceSize
string
default: nano
Allowed values: nano small medium large xlarge 2xlarge
logLevel
string
default: info
Allowed values: info debug warn error
binlogServerId

MySQL binlog server ID — must be unique across all replicas

integer
>= 1

A database instance config and its current lifecycle status

Media type application/json
Database

A database instance config and its current lifecycle status

object
id
required
string format: uuid
customerId
required
string format: uuid
connectionId
required

The connection that provides source MySQL credentials

string format: uuid
name
required
string
mysqlDb
required

The MySQL schema on the source server for this instance

string
syncMode
required

Sync mode for this instance

string
Allowed values: poll binlog logical cdc
syncInterval
required

Polling interval in seconds (>= connection minSyncInterval)

integer
taskCpu
required

ECS task vCPU units (256 = 0.25 vCPU)

integer
taskMemoryMb
required

ECS task memory in MiB

integer
logLevel
required
string
Allowed values: info debug warn error
status
required
string
Allowed values: registered building deploying running pausing paused resuming terminating terminated failed stopped
lastError
string
nullable
endpointUrl

HTTPS base URL of the running instance

string
nullable
healthStatus
string
nullable
Allowed values: ok degraded unreachable cap_exceeded
buildComputeOverride

Forced CodeBuild compute tier for this instance’s builds; null = auto-select

string
nullable
instanceSize
required
string
Allowed values: nano small medium large xlarge 2xlarge
region
required

AWS region this instance is deployed to

string
binlogServerId
integer
nullable
desiredState

Queued goal — reconciler drives the instance toward this state

string
nullable
reflexdbCustomDomain

Vanity subdomain (Teams+ plan). When set, <value>.reflexdb.cloud resolves to this instance.

string
nullable
pauseSchedule

Recurring pause/resume schedule (UTC). null when no schedule is configured.

object
pauseAt
required

HH:MM UTC

string
resumeAt
required

HH:MM UTC

string
days
required

0=Sun…6=Sat; empty = every day

Array<integer>
tags
required
Array<object>
Tag

A label attached to a database for organisation

object
label
required
string
<= 30 characters
color
required
string
Allowed values: gray red orange yellow green teal blue purple
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{
"syncMode": "poll",
"logLevel": "info",
"status": "registered",
"healthStatus": "ok",
"instanceSize": "nano",
"tags": [
{
"color": "gray"
}
]
}

Default Response

Media type application/json
Error
object
error
required
string
message
string
Example generated
{
"error": "example",
"message": "example"
}

Default Response

Media type application/json
Error
object
error
required
string
message
string
Example generated
{
"error": "example",
"message": "example"
}