mateeyow
By:
mateeyow

API endpoint for getting ip acnhor and private ip

January 18, 2016 2.7k views
DNS DigitalOcean API

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!

3 comments
  • 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.

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

  • @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

2 Answers

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

Have another answer? Share your knowledge.