POST /v2/databases/{database_cluster_uuid}/replicas
To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to /v2/databases/$DATABASE_ID/replicas
specifying the name it should be given, the size of the node to be used, and the region where it will be located.
Note: Read-only replicas are not supported for Redis or Valkey clusters.
The response will be a JSON object with a key called replica
. The value of this will be an object that contains the standard attributes associated with a database replica. The initial value of the read-only replica's status
attribute will be forking
. When the replica is ready to receive traffic, this will transition to active
.
Servers
- https://api.digitalocean.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
database_cluster_uuid |
String | Yes |
A unique identifier for a database cluster. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
id |
String | No |
A unique ID that can be used to identify and reference a database replica. |
region |
String | No |
A slug identifier for the region where the read-only replica will be located. If excluded, the replica will be placed in the same region as the cluster. |
name |
String | Yes |
The name to give the read-only replicating |
size |
String | Yes |
A slug identifier representing the size of the node for the read-only replica. The size of the replica must be at least as large as the node size for the database cluster from which it is replicating. |
private_network_uuid |
String | No |
A string specifying the UUID of the VPC to which the read-only replica will be assigned. If excluded, the replica will be assigned to your account's default VPC for the region. |
tags[] |
Array | No |
A flat array of tag names as strings to apply to the read-only replica after it is created. Tag names can either be existing or new tags. |
storage_size_mib |
Integer | No |
Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. |
status |
String | No |
A string representing the current status of the database cluster. Possible values:
|
created_at |
String | No |
A time value given in ISO8601 combined date and time format that represents when the database cluster was created. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.