GSLB.ME-RestClient is a simple Java client for GSLB.me‘s REST API. It can be easily run from your preferred command line and currently provides the following features:

GSLB.me REST API client 1.2 - http://www.gslb.me

./sh.GSLB.ME-RestClient [-u username] [-p password] [action] [parameters]

 -dyn (--dynamic) FQDN    : Action: Associates your current public IP address
                            to the given FQDN. Optional parameters: -iface and
                            -ttl
 -e (--encoding) TYPE     : Parameter: Desired output encoding (default: json)
 -gg (--get-geohost) NAME : Action: Retrieves configuration for the given
                            geohost
 -gr (--get-records) NAME : Action: Retrieves all records for the given zone
 -gz (--get-zone) NAME    : Action: Retrieves configuration for the given zone
 -h (--help)              : Show usage help
 -iface NAME              : Parameter: Interface to get the public IP from. The
                            action -dyn / --dynamic requires this option
 -p (--password) VAL      : Your GSLB.me password (mandatory)
 -ttl SECONDS             : Parameter: TTL to use for dynamic IP FQDN updates.
                            The action -dyn / --dynamic requires this option
 -u (--username) VAL      : Your GSLB.me username (mandatory)

 

Downloads

The full source code can be downloaded here and sample scripts to run it can be found under “sbin/”.

  • 1.0beta – released on May 6th, 2013 – initial release
  • 1.1beta – released on May 18th, 2013 – dynamic DNS support
  • 1.2 – released on December 27th, 2013 – provided with scripts to run it from both Unix/Linux and Windows OSes

The REST Client can also be found on GitHub

Sample usage

Retrieving a zone configuration:
  Linux  : ./sh.GSLB.ME-RestClient -u [username] -p [password] -gz [zone name]
  Windows: GSLB.me-RestClient.bat -u [username] -p [password] -gz [zone name]

Retrieving a geohost configuration:
  Linux  : ./sh.GSLB.ME-RestClient -u [username] -p [password] -gg [geohost name]
  Windows: GSLB.me-RestClient.bat -u [username] -p [password] -gg [geohost name]

Retrieving all records for the given zone:
  Linux  : ./sh.GSLB.ME-RestClient -u [username] -p [password] -gr [zone name]
  Windows: GSLB.me-RestClient.bat -u [username] -p [password] -gr [zone name]

Updating a FQDN with the public (dynamic) IP of the specified interface without/with custom TTL:
  Linux  : ./sh.GSLB.ME-RestClient -u [username] -p [password] -dyn [fqdn] -iface [interface name]
  Windows: GSLB.me-RestClient.bat -u [username] -p [password] -dyn [fqdn] -iface [interface name]

  Linux  : ./sh.GSLB.ME-RestClient -u [username] -p [password] -dyn [fqdn] -iface [interface name] -ttl [seconds]
  Windows: GSLB.me-RestClient.bat -u [username] -p [password] -dyn [fqdn] -iface [interface name] -ttl [seconds]

Updating a FQDN with the public (dynamic) IP using automatic IP detection without/with custom TTL:
  Linux  : ./sh.GSLB.ME-RestClient -u [username] -p [password] -dyn [fqdn]
  Windows: GSLB.me-RestClient.bat -u [username] -p [password] -dyn [fqdn]

  Linux  : ./sh.GSLB.ME-RestClient -u [username] -p [password] -dyn [fqdn] -ttl [seconds]
  Windows: GSLB.me-RestClient.bat -u [username] -p [password] -dyn [fqdn] -ttl [seconds]