Local Routes Method
This method lists South African IP routes.
URL:
Formats: json, php
Method(s): GET
Parameters:
http://extension.locality.co.za/api/0.1/network/routes-list.[data_format]Formats: json, php
Method(s): GET
Parameters:
asn (integer)[optional] Filter routes by ASN.ip (string)[optional] Filter routes by IP address, in dot quad format.since (integer)[optional] Filter routes by registration date, in UNIX timestamp format.
routes (array)A numbered array of routes.> asn_origin (integer)The ASN of the owner of this block.> asn_peers (string)A space separated list of ASN peers, as seen from Route Views.> asn_peers_za (string)A space separated list of local ASN peers, as seen from AS3741.> start_ip (integer)The first IP address in this block.> end_ip (integer)The last IP address in this block.> timestamp (array)The UNIX timestamp of when this block was registered.
- Request:
http://extension.locality.co.za/api/0.1/network/routes-list.json?asn=36943 - Response:
{ error_msg: null, error_type: null, response: { routes: [ { asn_origin: 36943, asn_peers: 5713 22355, asn_peers_za: 5713, start_ip: 699990016, end_ip: 700055551, timestamp: 1224540000 }, { asn_origin: 36943, asn_peers: 5713, asn_peers_za: 5713, start_ip: -992206848, end_ip: -992204801, timestamp: 1138053600 }, { asn_origin: 36943, asn_peers: 5713 22355, asn_peers_za: 5713, start_ip: -992200704, end_ip: -992198657, timestamp: 1138053600 } ] }, timestamp: 1234567890 }
Fair Usage Guidelines
Please be considerate with your requests, in other words don't make more requests than necessary. Determine whether a single or bulk request is better suited for the data you require. An example would be to consider using timestamp filtering to retrieve only the data you require since your last request. Another consideration would be to locally cache content where possible.