Starting a database
Getting the list of available base images
Every Tonic Ephemeral database requires an associated base image, used to run and load the data. Ephemeral provides empty base images for PostgreSQL and MySQL.
When you start a new database, you must provide the identifier of the base image. To get the list of available base images, use:
GET /api/database/images
The response includes the image identifier and the associated database type.
Getting the available compute resource options (resource groups)
When you start a new database, including when you copy an existing database, you specify the required compute resources. The compute resource includes the number of vCPUs and the amount of RAM.
To specify the compute resources, you provide the identifier of the resource group. To get the list of available resource groups, use:
GET /api/database/resource-groups
For each available resource group, the response includes the identifier, name, number of vCPUs, and the amount of RAM.
Starting a new database
To start a completely new database, use:
POST /api/database
The request includes:
Database name and description
The base image, volume, or user snapshot
Expiration configuration
Storage size
Resource group identifier
The response contains the database identifier.
Cloning a database from a snapshot of an existing database
You can also start a database by cloning an existing database. Specifically, you clone the new database from a snapshot of the original database.
To clone a database, use:
POST /api/database/clone/{volumeSnapshotId}
The request includes:
The required disk storage allocation for the new database
The resource group identifier
The expiration configuration for the new database
The response provides detailed information about the new database.
Last updated