Jump to content


Photo
* * * * * 1 votes

Add server status to API output

API support request XML

  • Please log in to reply
6 replies to this topic

#1 mblue

mblue

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 30 May 2015 - 03:59 PM

What is the feasibility of adding the server's status (online, offline, imminent withdrawal, etc.) as a new Attribute name in an XML formatted API call?  This would be very helpful for those of us wishing to rank servers and then select one for connection via openvpn.  Thank you.
 

Edited by mblue, 31 May 2015 - 11:45 AM.


#2 giganerd

giganerd

    I shall have no title

  • Members2
  • PipPipPip
  • 2687 posts
  • LocationGermany

Posted 31 May 2015 - 09:11 AM

For generalization, a status data field could display all kinds of status messages - online status and current issues.


Always remember:
There's a guide to AirVPN,

Amazon IPs are not dangerous here,
running TOR exits is discouraged,

using spoilers for your logs helps us read your thread.

~ Furthermore, I propose that your paranoia is to be destroyed. ~

Instead of writing me a personal mail, consider contacting me via XMPP at gigan3rd@xmpp.airvpn.org or join the lounge@conference.xmpp.airvpn.org. I might read the mail too late whereas I'm always available on XMPP ;)


#3 mblue

mblue

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 31 May 2015 - 11:37 AM

For generalization, a status data field could display all kinds of status messages - online status and current issues.

 

Good idea.  I edited my original post to be more general in this request.



#4 giganerd

giganerd

    I shall have no title

  • Members2
  • PipPipPip
  • 2687 posts
  • LocationGermany

Posted 31 May 2015 - 11:50 AM

And please contact Staff about this, too, via support ticket for example. :)


Always remember:
There's a guide to AirVPN,

Amazon IPs are not dangerous here,
running TOR exits is discouraged,

using spoilers for your logs helps us read your thread.

~ Furthermore, I propose that your paranoia is to be destroyed. ~

Instead of writing me a personal mail, consider contacting me via XMPP at gigan3rd@xmpp.airvpn.org or join the lounge@conference.xmpp.airvpn.org. I might read the mail too late whereas I'm always available on XMPP ;)


#5 mblue

mblue

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 31 May 2015 - 12:03 PM

And please contact Staff about this, too, via support ticket for example. :)

 

Done (request #33079), thanks for push :)



#6 Staff

Staff

    Advanced Member

  • Staff
  • PipPipPip
  • 7858 posts

Posted 01 June 2015 - 01:23 PM

Hello!

 

Health status, reason, and entry IP added. Look at the bottom of the answer to the faq: https://airvpn.org/faq/api/

Any feedback improvement is greatly appreciated.

@mblue: We understand you fetch our API with a custom script and generate OVPN config files.
Maybe it can be interesting for our community if you explain your needs or reasons. Maybe we can improve our API or our config generator.

 

Thanks.

 

Kind regards



#7 mblue

mblue

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 01 June 2015 - 07:34 PM

@staff - Thank you, the new data are very nice.  My thought was to have a script select the best server (best = lowest bandwidth in the country of my choosing) and then update /etc/openvpn/air.conf with that IP address before connecting.  Is this a good strategy to insure good speeds and responsiveness?

 

The main part of the script just fetches and produces a list based on the bandwidth value.  Again, is there a better way to do this?

 

Note to readers - the server loads and status, etc. are dynamic so this query would need to be repeated once every time you want to connect I would think so you can simply make the script run by your init system when you start your openvpn.

 

$ wget -q -O /tmp/airpull.xml "https://airvpn.org/api/?format=xml&key=MYKEY&service=status"
$ xml sel -t -m '//servers[@country_code="ca" and @bw_max=1000 and @health="ok"]' \
-v @bw -o " " -v @ip_entry -o " "  -v @public_name -n /tmp/airpull.xml  | sort -n
88 104.254.90.250 Gorgonea
90 199.19.94.19 Spica
127 199.19.94.132 Rana
...






Similar Topics Collapse


Also tagged with one or more of these keywords: API, support, request, XML

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

Servers online. Online Sessions: 14529 - BW: 44905 Mbit/sYour IP: 34.204.52.4Guest Access.