Create a database
Creates a database in one of your networks. To start it from a backup of another of your databases of the same type, send backupSourceId and backupToRestoreName (only for mysql, mariadb, postgres and mongodb).
Your balance must be high enough to cover the database. Your account must be verified. With teamID, your role needs the database.create permission.
Authorizations
Send your API token as Authorization: Bearer <api-token>.
Query Parameters
Run the request in the context of a team you belong to, instead of your personal account. 24-character hexadecimal ID.
^[0-9a-fA-F]{24}$Body
The database's name, also its hostname inside the network. Lowercase letters, digits and hyphens; not all digits, and not localhost.
3 - 50^[a-z0-9][a-z0-9\-]+[a-z0-9]$mysql, mariadb, postgres, mongodb, redis, mssql, elasticsearch, rabbitmq, clickhouse The database's resource plan. small-g2 and medium-g2 don't support mssql or clickhouse, and small-g2 doesn't support elasticsearch. See Liara's pricing page for what each plan includes.
small-g2, medium-g2, standard-base-g2, standard-pro-g2, pro-g2, pro-plus-g2, pro-max-g2 The bundle plan, which sets backups, metrics retention, editable settings and public network access.
basic, standard, pro ID of one of your networks.
^[0-9a-fA-F]{24}$One of the version values for this type from GET /v1/databases/versions. Defaults to the newest.
Make the database reachable from the internet. Ignored if the bundle plan doesn't allow it.
Type-specific options:
mysql,mariadb:rootPassword(otherwise one is generated),defaultDBName,eventScheduler(ONorOFF)mongodb:standaloneReplicaSet(boolean, defaultfalse)postgres:postgis,pgvector(booleans, defaultfalse)mssql:FTS(full-text search, boolean, defaultfalse)
ID of the database whose backup to start from. Send together with backupToRestoreName.
^[0-9a-fA-F]{24}$The backup's name from GET /v1/databases/{databaseID}/backups of the source database.
100Response
The database is being created.
