v1
latestSwagger 2.02026-07-172964242.9 KBDatabase
Get database
Returns information about a particular database in the cluster.
get/v1/databases/{database_id}
Path parameters
database_idstring required
A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.
Query parameters
includestring[]
Optional fields to include in the response. Supported values: available_upgrades.
Response
OK response.
Example response
{
"created_at": "2025-06-18T16:52:05Z",
"id": "storefront",
"instances": [
{
"connection_info": {
"addresses": [
"10.24.34.2",
"i-0123456789abcdef.ec2.internal"
],
"port": 5432
},
"created_at": "2025-06-18T16:52:22Z",
"host_id": "us-east-1",
"id": "storefront-n1-689qacsi",
"node_name": "n1",
"postgres": {
"patroni_state": "running",
"role": "primary",
"version": "18.1"
},
"spock": {
"read_only": "off",
"subscriptions": [
{
"name": "sub_n1n3",
"provider_node": "n3",
"status": "replicating"
},
{
"name": "sub_n1n2",
"provider_node": "n2",
"status": "replicating"
}
],
"version": "4.0.10"
},
"state": "available",
"status_updated_at": "2025-06-18T17:58:56Z",
"updated_at": "2025-06-18T17:54:36Z"
},
{
"connection_info": {
"addresses": [
"10.24.35.2",
"i-058731542fee493f.ec2.internal"
],
"port": 5432
},
"created_at": "2025-06-18T16:52:22Z",
"host_id": "ap-south-1",
"id": "storefront-n2-9ptayhma",
"node_name": "n2",
"postgres": {
"patroni_state": "running",
"role": "primary",
"version": "18.1"
},
"spock": {
"read_only": "off",
"subscriptions": [
{
"name": "sub_n2n1",
"provider_node": "n1",
"status": "replicating"
},
{
"name": "sub_n2n3",
"provider_node": "n3",
"status": "replicating"
}
],
"version": "4.0.10"
},
"state": "available",
"status_updated_at": "2025-06-18T17:58:56Z",
"updated_at": "2025-06-18T17:54:01Z"
},
{
"connection_info": {
"addresses": [
"10.24.36.2",
"i-494027b7b53f6a23.ec2.internal"
],
"port": 5432
},
"created_at": "2025-06-18T16:52:22Z",
"host_id": "eu-central-1",
"id": "storefront-n3-ant97dj4",
"node_name": "n3",
"postgres": {
"patroni_state": "running",
"role": "primary",
"version": "18.1"
},
"spock": {
"read_only": "off",
"subscriptions": [
{
"name": "sub_n3n1",
"provider_node": "n1",
"status": "replicating"
},
{
"name": "sub_n3n2",
"provider_node": "n2",
"status": "replicating"
}
],
"version": "4.0.10"
},
"state": "available",
"status_updated_at": "2025-06-18T17:58:56Z",
"updated_at": "2025-06-18T17:54:01Z"
}
],
"spec": {
"database_name": "storefront",
"database_users": [
{
"attributes": [
"SUPERUSER",
"LOGIN"
],
"db_owner": true,
"username": "admin"
}
],
"nodes": [
{
"host_ids": [
"us-east-1"
],
"name": "n1"
},
{
"host_ids": [
"ap-south-1"
],
"name": "n2"
},
{
"host_ids": [
"eu-central-1"
],
"name": "n3"
}
],
"port": 5432,
"postgres_version": "17.6",
"spock_version": "5"
},
"state": "restoring",
"updated_at": "2025-06-18T17:58:59Z"
}