We are creating a database cluster from the api. That part works fine, but we need a way to check and be notified once the cluster is done provisioning so we can add the databases to it. We tried making a curl call to the host but that seems to return the same response regardless if its provisioning or complete. I was able to find this for droplets, but not for database clusters.
TIA
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
I believe that this information should be available using this API call:
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/databases/{database_cluster_uuid}"
This will return information about the cluster and its status as follows:
{
"database": {
"id": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30",
"name": "backend",
"engine": "pg",
"version": "14",
...
"num_nodes": 2,
"region": "nyc3",
"status": "creating",
"created_at": "2019-01-11T18:37:36.000Z",
...
}
}
For more information you can check out the ‘Retrieve an Existing Database Cluster’ section here:
https://docs.digitalocean.com/reference/api/api-reference/#operation/get_database_cluster
Hope that this helps!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.