On Wed, Nov 19, 2014 at 1:13 PM, G1FEF <chris(a)g1fef.co.uk> wrote:
Thanks Chris,
this is neat. Where can I find the API specification?
If you login and select “API” from the menu there is some info there about it.
You seem to have misunderstood what I meant by a specification. I
poked around the service and think I sussed out the details I asked
for. Here they are (feel free to paste this into your documentation
page):
Endpoints
encap
Arguments:
None
Returns:
A list containing a dictionary for each encap route. The dictionaries
will contain the following keys: encapType, gatewayIP, netmask,
network, owner, title, and updated. The dictionary values will all be
strings. "updated" is a datetime string in the format YYYY-MM-DD
HH:MM:SS (similar to ISO 8601, but lacking a timezone).
Example request:
GET /api/v1/encap HTTP/1.1
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Host:
portal.ampr.org
Example Response:
[ { u'encapType': u'IPIP',
u'gatewayIP': u'219.94.234.244',
u'netmask': u'24',
u'network': u'44.129.128.0',
u'owner': u'JH1VBB',
u'title': u'JH1VBB',
u'updated': u'2014-08-13 09:25:34'},
{ u'encapType': u'IPIP',
u'gatewayIP': u'220.245.50.125',
u'netmask': u'32',
u'network': u'44.135.103.130',
u'owner': u'VK2DOT',
u'title': u'Central Coast, NSW, Australia',
u'updated': u'2014-09-20 02:38:31'},
{ u'encapType': u'IPIP',
u'gatewayIP': u'220.245.50.125',
u'netmask': u'24',
u'network': u'44.136.16.0',
u'owner': u'VK2DOT',
u'title': u'Central Coast, NSW, Australia',
u'updated': u'2014-09-20 02:38:31'}]
Tom KD7LXL