Using Digital Ocean’s API, I’ve created database cluster ‘B’ from the restore point of database ‘A’, but have not been able to connect due to a self-signed certificate error.
I have pulled the certificate from the endpoint: https://api.digitalocean.com/v2/databases/{database B id}/ca
If I manually download the certificate from the dashboard, everything works, btw.
The endpoint appears to be returning the wrong certificate, because when I pull the certificate from database A, they are the same.
Comparing certificates downloaded from the dashboard confirms that they are different.
Is this the expected behaviour? How do I get the correct certificate for database B?
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @ShuStudios
CA file you are getting from API is encoded. You will have to decode the file from Base64 format after removing quotes and brackets. You can decode the file by terminal or by online conversion.
Example :-
base64 -D ~/Downloads/ca-api > ~/Downloads/ca-cert
You can also decode the file from below website :
I hope this helps.
Regards, Anadi
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.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
