How to tell if backups are enabled via the v2 API

Posted December 31, 2015 2.4k views

I can see that there is an array for backup_ids in a hash for a droplet, but before there are any backups, is there a way to tell if backups are enabled via the API? An entry with a logical true/false would be nice.

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.

Submit an Answer
1 answer

There’s a features array near the end of the droplet object that you can check even before the first backup has been taken. If backups are enabled, it will be listed as an element in that array, the same as private_networking, ipv6, and virtio too (although Virtio is enabled by default for all new droplets, it was optional at one time). You can see a sample response body in the API call to retrieve a droplet by ID.