Question

API endpoint for getting ip acnhor and private ip

Hi Guys!

I really like your new API but I was wondering if you have an endpoint for getting the anchor ip address and private ip using API only. If none exists, do you have any plans on adding this on your API?

Thanks!

Subscribe
Share

@mateeyow - If you mean by ‘anchor ip’ the floating ip (for your account or for individual droplets), then have a look at the api for floating IPs

I got the private ip but not the anchor ip address.

Can you not get the network info using the Droplets API service?

#!/bin/sh
MYTOKEN=youneedtogetyourprivatetokenandplacedhere
MYDROPLETID=yourdropletidhere
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ${MYTOKEN}" "https://api.digitalocean.com/v2/droplets/${MYDROPLETID}"

If you have a json processor, like jq, then you can pipe the curl output to it.


Submit an 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.

This question was answered by @gndo:

@mateeyow - If you mean by ‘anchor ip’ the floating ip (for your account or for individual droplets), then have a look at the api for floating IPs

View the original comment