Read-only replicas

Create a read-only replica

Authorization

A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:

Service Token Accesses write_database

OAuth Scopes

ResourceScopes
Organizationwrite_databases
Databasewrite_database
post/organizations/{organization}/databases/{database}/branches/{branch}/read-only-replicas

Path parameters

organizationstring required

Organization name slug from list_organizations. Example: acme.

databasestring required

Database name slug from list_databases. Example: app-db.

branchstring required

Branch name from list_branches. Example: main.

Request body

namestring required

The read-only replica name

regionstring required

The region slug for the read-only replica

replicasinteger

The number of instances serving reads. Defaults to 1.

cluster_sizestring

The cluster size SKU name. Defaults to the primary cluster size.

Response

Returns the new read-only replica

idstring required

The ID of the read-only replica

namestring required

The name of the read-only replica

statestring required

The state of the read-only replica: pending, ready, or deleting

replicasinteger required

The number of instances serving reads in this read-only replica

cluster_namestring required

The SKU representing the cluster size of the read-only replica

cluster_display_namestring required

The SKU representing the cluster size of the read-only replica, for display

access_host_urlstring required

The database connection host for the read-only replica

private_access_host_urlstring required

The private database connection host for the read-only replica

private_connection_service_namestring nullable required

The service name to set up private connectivity for the read-only replica

created_atstring required

When the read-only replica was created

updated_atstring required

When the read-only replica was last updated

ready_atstring nullable required

When the read-only replica was ready to serve queries

readyboolean required

Whether or not the read-only replica is ready to serve queries

Changes

Changed in 1 of the 24 revisions of this API.1