Databases

You can use the databases endpoint to:

Get list of databases by Company ID

SecuritybearerAuth
Request
query Parameters
company
required
string
Example: company=54fb80af-576c-4fdc-ba4f-b596c83f15a1
limit
number
Default: 10
Example: limit=10
offset
number
Default: 0
Example: offset=3
Responses
200

Response object of databases requests

401

No or invalid API key provided to the request

404

Could not find the company or the user does not have permissions to retrieve data

500

Error occurred while retrieving databases

get/databases
Request samples
Response samples
database/json
{
  • "databases": {
    }
}

Create a new database

SecuritybearerAuth
Request
Request Body schema: application/json
required
company_id
required
string
location
required
string

the location (data center) where the database will be created

resource_type
required
string

the resource type (database size) to be created

Enum: "db1" "db2" "db3" "db4" "db5" "db6" "db7" "db8" "db9"
display_name
required
string
db_name
required
string
db_password
required
string
type
required
string
Enum: "postgresql" "redis" "mariadb" "mysql"
version
required
string
db_user
string

Only optional for Redis. Required for all other types.

Responses
200

Response object of create database request

401

No or invalid API key provided to the request

404

Could not find the company or the user does not have permissions to create a database

500

Error occurred while creating database

post/databases
Request samples
application/json
{
  • "company_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "location": "us-central1",
  • "resource_type": "db1",
  • "display_name": "test-db",
  • "db_name": "test-db",
  • "db_password": "example-password",
  • "db_user": "example-user",
  • "type": "postgresql",
  • "version": "15"
}
Response samples
database/json
{
  • "database": {
    }
}

Get database by id

SecuritybearerAuth
Request
path Parameters
id
required
string
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
query Parameters
internal
required
boolean
Default: true
Example: internal=true
external
required
boolean
Default: true
Example: external=true
Responses
200

Response object of databases requests

401

No or invalid API key provided to the request

404

Could not find the database or the user does not have permissions to retrieve data

500

Error occurred while retrieving database

get/databases/{id}
Request samples
Response samples
database/json
{
  • "database": {
    }
}

Update a database

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
Request Body schema: application/json
required
resource_type
string

the resource type (database size) to be updated

Enum: "db1" "db2" "db3" "db4" "db5" "db6" "db7" "db8" "db9"
display_name
string
Responses
200

Response object of update database request

401

No or invalid API key provided to the request

404

Could not find the company or the user does not have permissions to update a database

500

Error occurred while updating database

put/databases/{id}
Request samples
application/json
{
  • "resource_type": "db1",
  • "display_name": "test-db"
}
Response samples
database/json
{
  • "database": {
    }
}

Delete database by id

SecuritybearerAuth
Request
path Parameters
id
required
string
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
Responses
200

Response object of databases requests

401

No or invalid API key provided to the request

404

Could not find the database or the user does not have required permissions

500

Error occurred while deleting database

delete/databases/{id}
Request samples
Response samples
database/json
{
  • "message": "Database \"54fb80af-576c-4fdc-ba4f-b596c83f15a1\" is being deleted"
}

Get database by nameDeprecated

SecuritybearerAuth
Request
path Parameters
name
required
string
Example: unique-name
query Parameters
internal
required
boolean
Default: true
Example: internal=true
external
required
boolean
Default: true
Example: external=true
Responses
200

Response object of databases requests

401

No or invalid API key provided to the request

404

Could not find the database or the user does not have permissions to retrieve data

500

Error occurred while retrieving database

get/databases/{name}
Request samples
Response samples
database/json
{
  • "database": {
    }
}