Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

getCommunications

Base URL/api/v1/api.php?target=peering&action=getCommunications
DescriptionReturns all communication data on peers at a particular exchange.
Returns

Examples:

SUCCESSFUL{"success":1,"message":"65 8 records found.","data":[{"name":"1&1 Internet","asn":"8560","request_status":null,"qualified":null,"is_peer":false,"id":"262","log_data":[]},{"name":"Akamai Technologies","asn":"20940","request_status":null,"qualified":null,"is_peer":false,"id":"2","log_data":[]},{"name":"Amazon.com","asn":"16509","request_status":null,"qualified":null,"is_peer":false,"id":"1418","log_data":[]},{"name":"Atrato IP Networks","asn":"5580","request_status":null,"qualified":null,"is_peer":false,"id":"2283","log_data":[]},{"name":"OVH","asn":"16276","request_status":null,"qualified":null,"is_peer":false,"id":"1264","log_data":[]},{"name":"Verisign","asn":"7342","request_status":null,"qualified":null,"is_peer":false,"id":"873","log_data":[]},{"name":"Walmart.com","asn":"17374","request_status":null,"qualified":null,"is_peer":false,"id":"627","log_data":[]},{"name":"Windstream Communications","asn":"7029","request_status":null,"qualified":null,"is_peer":false,"id":"1820","log_data":[]},{"name":"Yahoo!","asn":"10310","request_status":null,"qualified":null,"is_peer":false,"id":"27","log_data":[]},{"name":"Zayo","asn":"19092","request_status":null,"qualified":null,"is_peer":false,"id":"3611","log_data":[]},{"name":"Zayo (Abovenet Communications Inc.)","asn":"6461","request_status":null,"qualified":null,"is_peer":false,"id":"541","log_data":[]},{"name":"tw telecom","asn":"4323","request_status":null,"qualified":null,"is_peer":false,"id":"540","log_data":[]}]}
ERROR{'success':0, 'message':'error message'}
Required Parameters
Name
Type
Example
Description
public_idINTEGER1The unique numerical identifier of the exchange to retrieve peering communicaiton records for.
Optional ParametersNone
Example URL/api/v1/api.php?target=peering&action=getCommunications&public_id=1

...

getSessions

URL/api/v1/api.php?target=peering&action=getSessions
DescriptionReturns a list of all bgp peering sessions
Returns

Examples: 
SUCCESSFUL: {"success":1,"message":"1 sessions found.","data":[{"id":"51","source_asn":"32787","source_ipaddr":"1.2.3.4","resource_id":"422","resource_name":"ar1.inoc.com","peer_asn":"20940","peer_name":"Akamai Technologies","peer_participant_id":"2","peer_ipaddr":"206.126.236.102","peer_hostname":null,"peer_group":"group b","public_id":"1","public_name":"Equinix Ashburn","ip_type":"ipv4","type":"Peer","state":"not configured","prfx_max":"20","prfx_received":null,"password":"0","note":null},]}

ERROR: {"success":1,"message":"No peers found."}

Required Parameters
Name
Type
Example
Description
public_idINTEGER1The unique numerical identifier of the exchange to retrieve peering communicaiton records for.
Optional Parameters
Name
Type
Example
Description
idINTEGER41 
public_idINTEGER  
source_asnINTEGER  
source_ipaddrSTRING  
resource_idINTEGER  
peer_asnINTEGER  
peer_nameSTRING  
peer_participant_idINTEGER  
peer_ipaddrSTRING  
peer_hostnameSTRING  
peer_groupSTRING  
passwordINTEGER  
typeSTRING  
stateSTRING  
prfx_maxINTEGER  
prfx_receivedINTEGER  
ip_typeENUM enum('ipv4','ipv6') NOT NULL DEFAULT 'ipv4'
noteSTRING  
createdTIMESTAMP  
modifiedTIMESTAMP  
deletedINTEGER  
public_idINTEGER  
Example URL/api/v1/api.php?target=peering&action=getPeers&public_id=1

addSession

URL/api/v1/api.php?target=peering&action=addSession
DescriptionAdds a bgp session
Returns

Examples: 
SUCCESSFUL: {"success":1,"message":"Session added: Amazon.com (AS8038\/1.2.3.5) - (AS16509\/206.126.236.68)","data":{"id":111,"source_asn":"8038","source_ipaddr":"1.2.3.5","resource_id":"422","resource_name":null,"peer_asn":"16509","peer_name":"Amazon.com","peer_participant_id":"1418","peer_ipaddr":"206.126.236.68","peer_hostname":null,"peer_group":"LAME-PEERS","public_id":"1","public_name":null,"ip_type":"ipv4","type":"Peer","state":"not configured","prfx_max":"200","prfx_received":null,"password":"ace12345","note":"I'm a fancy note."}}

ERROR: {"success":1,"message":"No request found.","data":[]}

Required Parameters

None

Optional Parameters
Name
Type
Example
Description
 source_asn INTEGER 1 The numerical id of the peer
source_ipaddrSTRING  
resource_idINTEGER  
peer_asnINTEGER  
peer_nameSTRING  
peer_participant_idINTEGER  
peer_ipaddrSTRING  
peer_hostnameSTRING  
peer_groupSTRING  
public_id   
typeSTRING  
ip_typeENUM enum('ipv4','ipv6')
stateSTRING  
prfx_maxINTEGER  
noteSTRING  
Example URL/api/v1/api.php?target=peering&action=getRequests&peer_participant_id=1

configureSession

URL/api/v1/api.php?target=peering&action=configureSession
DescriptionConfigure a BGP session on the router
Returns

Examples: 
SUCCESSFUL:

ERROR: {"success":0,"message":"Unable to authenticate "}

Required Parameters
Name
Type
Example
Description
 session_id INTEGER 1 
Optional Parameters
Name
Type
Example
Description
 session_id INTEGER 1 The numerical id of the peer
source_ipaddrSTRING  
resource_idINTEGER  
peer_asnINTEGER  
peer_nameSTRING  
peer_participant_idINTEGER  
peer_ipaddrSTRING  
peer_hostnameSTRING  
peer_groupSTRING  
public_id   
typeSTRING  
ip_typeENUM enum('ipv4','ipv6')
stateSTRING  
prfx_maxINTEGER  
noteSTRING  
Example URL/api/v1/api.php?target=peering&action=configureSession&session_id=51&username=&config=conf+t%0A%0Arouter+bgp+32787%0A%0Ano+neighbor+206.126.236.102%0A%0Aneighbor+206.126.236.102+remote-as+20940%0Aneighbor+206.126.236.102+peer-group+group+b%0Aneighbor+206.126.236.102+description+Akamai+Technologies%0Aneighbor+206.126.236.102+maximum-prefix+20+%0Aneighbor+206.126.236.102+password+0+0%0A%0Aend%0Awrite

deleteSession

URL/api/v1/api.php?target=peering&action=deleteSession
Description 
Returns

Examples: 
SUCCESSFUL: {"success":1,"message":"1 sessions deleted."}

ERROR: {"success":0,"message":"No sessions found to delete."}

Required Parameters

None

Optional Parameters
Name
Type
Example
Description
idINTEGER41 
public_idINTEGER  
source_asnINTEGER  
source_ipaddrSTRING  
resource_idINTEGER  
peer_asnINTEGER  
peer_nameSTRING  
peer_participant_idINTEGER  
peer_ipaddrSTRING  
peer_hostnameSTRING  
peer_groupSTRING  
passwordINTEGER  
typeSTRING  
stateSTRING  
prfx_maxINTEGER  
prfx_receivedINTEGER  
ip_typeENUM enum('ipv4','ipv6') NOT NULL DEFAULT 'ipv4'
noteSTRING  
createdTIMESTAMP  
modifiedTIMESTAMP  
deletedINTEGER  
public_idINTEGER  
Example URL/api/v1/api.php?target=peering&action=deleteSession&id=171