You can use the databases
endpoint to:
PUT
request to update the database settings, including the resource type and display name.Response object of databases requests
No or invalid API key provided to the request
Could not find the company or the user does not have permissions to retrieve data
Error occurred while retrieving databases
{- "databases": {
- "items": [
- {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "unique-db-name",
- "display_name": "firstsite_db",
- "status": "ready",
- "updated_at": 1676218612219,
- "type": "postgresql",
- "version": "14",
- "resource_type_name": "db1"
}
]
}
}
Response object of create database request
No or invalid API key provided to the request
Could not find the company or the user does not have permissions to create a database
Error occurred while creating database
{- "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"
}
{- "database": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}
}
Response object of databases requests
No or invalid API key provided to the request
Could not find the database or the user does not have permissions to retrieve data
Error occurred while retrieving database
{- "database": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "unique-db-name",
- "display_name": "firstsite-db",
- "status": "ready",
- "created_at": 1668697088806,
- "memory_limit": 250,
- "cpu_limit": 250,
- "storage_size": 1000,
- "type": "postgresql",
- "version": "14",
- "cluster": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "location": "europe-west3",
- "display_name": "Frankfurt, Germany Europe"
}, - "resource_type_name": "db1",
- "internal_hostname": "some-name.dns.svc.cluster.local",
- "internal_port": "5432",
- "internal_connections": [
- {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "type": "appResource"
}
], - "data": {
- "db_name": "firstsite-db",
- "db_password": "password",
- "db_root_password": "password",
- "db_user": "username"
}, - "external_connection_string": "postgresql://username:password@localhost:31866/firstsite-db",
- "external_hostname": "firstsite-db-postgresql.external.kinsta.app",
- "external_port": "31866"
}
}
Response object of update database request
No or invalid API key provided to the request
Could not find the company or the user does not have permissions to update a database
Error occurred while updating database
{- "resource_type": "db1",
- "display_name": "test-db"
}
{- "database": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "display_name": "test-db",
- "status": "updating"
}
}
Response object of databases requests
No or invalid API key provided to the request
Could not find the database or the user does not have required permissions
Error occurred while deleting database
{- "message": "Database \"54fb80af-576c-4fdc-ba4f-b596c83f15a1\" is being deleted"
}
Response object of databases requests
No or invalid API key provided to the request
Could not find the database or the user does not have permissions to retrieve data
Error occurred while retrieving database
{- "database": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "unique-db-name",
- "display_name": "firstsite-db",
- "status": "ready",
- "created_at": 1668697088806,
- "memory_limit": 250,
- "cpu_limit": 250,
- "storage_size": 1000,
- "type": "postgresql",
- "version": "14",
- "cluster": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "location": "europe-west3",
- "display_name": "Frankfurt, Germany Europe"
}, - "resource_type_name": "db1",
- "internal_hostname": "some-name.dns.svc.cluster.local",
- "internal_port": "5432",
- "internal_connections": [
- {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "type": "appResource"
}
], - "data": {
- "db_name": "firstsite-db",
- "db_password": "password",
- "db_root_password": "password",
- "db_user": "username"
}, - "external_connection_string": "postgresql://username:password@localhost:31866/firstsite-db",
- "external_hostname": "firstsite-db-postgresql.external.kinsta.app",
- "external_port": "31866"
}
}