Report this

What is the reason for this report?

Is there a way of retrieving all allowed IPv6 addresses via the api?

Posted on November 15, 2017

I can retrieve info about a droplet via https://api.digitalocean.com/v2/droplets/ in the API. However I need to retrieve the other addresses allocated to me in the range programmatically - ie without manually checking. Does this exist?



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.

The /v2/droplets response includes all the IP addresses (both IPv4 and IPv6) that are allocated to each Droplet. Is that what you need?

Reference: https://developers.digitalocean.com/documentation/v2/#list-all-droplets

No that just gives you the one IPv6 address allocated at startup. It does not give you the range of IPv6 addresses that you could add. Anyway I have got round this by writing a script to work out the range from that address, running it on any new deployment to create a batch file to add them, and then running that file. I work heavily with IPv6 and I must say I’m a little surprised at the allocation of only 16 addresses when each instance actually has millions available to allocate. Even 256 would be absolutely no skin off DO’s nose. Honestly if another cloud provider starts doing this I suspect people will move there.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.