Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 8.0.0

Peering

Warning
ProVision's APIv1 system has been replaced by APIv2, and is now considered deprecated. 

Table of Contents

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":"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


getPeers

URL/api/v1/api.php?target=peering&action=getPeers
DescriptionReturns a list of all peers available at an exchange
ReturnsExamples: 
SUCCESSFUL: {"success":1,"message":"184 peers found.","data":[{"id":"262","public_id":"1","asn":"8560","name":"1&1 Internet","qualified":true,"is_peer":0,"request_status":"sent","info_prefixes":"150","public_ips":[],"contacts":[],"log_data":[]},"id":"286","public_id":null,"asn":"3856","name":"Packet Clearing House","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"100","public_ips":[],"contacts":[],"log_data":[]},{"id":"890","public_id":null,"asn":"13768","name":"PEER 1 Hosting","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"3000","public_ips":[],"contacts":[],"log_data":[]},{"id":"1676","public_id":null,"asn":"3737","name":"PenTeleData","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"80","public_ips":[],"contacts":[],"log_data":[]},{"id":"1560","public_id":null,"asn":"23265","name":"Pocketinet Communications, Inc.","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"200","public_ips":[],"contacts":[],"log_data":[]},{"id":"576","public_id":null,"asn":"32787","name":"Prolexic","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"500","public_ips":[],"contacts":[],"log_data":[]},"id":"353","public_id":null,"asn":"27524","name":"Xeex Communications","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"3000","public_ips":[],"contacts":[],"log_data":[]},{"id":"27","public_id":null,"asn":"10310","name":"Yahoo!","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"500","public_ips":[],"contacts":[],"log_data":[]},{"id":"1751","public_id":null,"asn":"13238","name":"Yandex LLC","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"60","public_ips":[],"contacts":[],"log_data":[]},{"id":"4078","public_id":null,"asn":"19468","name":"YieldBuild Inc","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"5","public_ips":[],"contacts":[],"log_data":[]},{"id":"541","public_id":null,"asn":"6461","name":"Zayo (Abovenet Communications Inc.)","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":"20000","public_ips":[],"contacts":[],"log_data":[]},{"id":"2351","public_id":null,"asn":"14824","name":"Zynga Game Network, Inc.","qualified":true,"is_peer":0,"request_status":null,"info_prefixes":null,"public_ips":[],"contacts":[],"log_data":[]}]} 
ERROR: {"success":1,"message":"No peers found."}
Required Parameters

None

Optional Parameters


Name
Type
Example
Description
public_idINTEGER1The unique numerical identifier of the exchange to retrieve peering communication records for.
idINT1The unique numerical identifier of the peer in peeringDB.
asnINT4436 
nameSTRINGGTT 
akaSTRINGnLayer 
websiteSTRINGhttp://www.gt-t.net 
notes_publicSTRING  

notes_privateSTRING  

irr_as_setSTRINGAS-NLAYER 
info_trafficENUM1 Tbps+enum('Not Disclosed','0-20 Mbps','20-100Mbps','100-1000Mbps','1-5Gbps','5-10Gbps','10-20Gbps','20-50 Gbps','50-100 Gbps','100+ Gbps','100-200 Gbps','200-300 Gbps','300-500 Gbps','500-1000 Gbps','1 Tbps+') DEFAULT 'Not Disclosed'
info_ratioENUMMostly Outboundenum('Not Disclosed','Heavy Outbound','Mostly Outbound','Balanced','Mostly Inbound','Heavy Inbound') DEFAULT 'Not Disclosed'
info_scopeENUMGlobalenum('Not Disclosed','Regional','North America','Asia Pacific','Europe','Africa','South America','Global') DEFAULT NULL
info_typeENUMNSPenum('Not Disclosed','NSP','Content','Cable/DSL/ISP','Enterprise','Educational/Research','Non-Profit') DEFAULT 'Not Disclosed'
info_prefixesINT10000 
info_lookingglassSTRINGhttp://lg.nlayer.net/ 
info_routeserverSTRINGtelnet://route-server.nlayer.net 
info_unicastCHAR1 
info_multicastCHAR  

info_ipv6CHAR1 
policy_urlSTRINGhttp://www.gt-t.net/Peering_policies.aspx 
policy_generalENUMSelectiveenum('Open','Selective','Restrictive','No') DEFAULT NULL
policy_locationsENUMRequired - Internationalenum('Not Required','Preferred','Required - US','Required - International') DEFAULT NULL
policy_ratioENUMNoenum('Yes','No') DEFAULT NULL
policy_contractsENUMNot Requiredenum('Not Required','Private Only','Required') DEFAULT NULL
policy_nopublicENUMNenum('Y','N') NOT NULL DEFAULT 'N'
policy_noprivateENUMNenum('Y','N') NOT NULL DEFAULT 'N'
date_createdDATETIME2013-03-21 15:36:42Date the peeringdb entry was created
date_lastupdatedDATETIME2013-03-21 15:36:42Date the peeringdb entry was last updated
include_public_ipsBOOL TRUE Returns a list of all public facing IPs
include_contactsBOOLTRUEReturns a list of all contacts associated with peer(s)
include_log_dataBOOLTRUEReturns a list of all log data associated with the peer(s) (use with care)


Example URL/api/v1/api.php?target=peering&action=getPeers&public_id=1


getRequests

URL/api/v1/api.php?target=peering&action=getRequests
DescriptionReturns a list of all peering requests issued
Returns

Examples: 
SUCCESSFUL: {"success":1,"message":"1 request found.","data":[{"id":"131","public_id":"5","source_participant_id":"2335","source_asn":"8038","peer_participant_id":"1418","peer_asn":"16509","peer_name":"Amazon.com","email_type":"text","email_from":"ops@6connect.com","email_to":"nalinmk@gmail.com","subject":"Peering request from 6connect, Inc.","body":"Peering,\r\n\r\n6connect, Inc., 8038, would like to peer with Amazon.com at our common locations.\r\n\r\nFacility, IP Address\r\nEquinix Ashburn - 206.126.236.68\r\nEquinix Palo Alto - 198.32.176.36\r\nEquinix Ashburn - 206.126.236.35\r\nEquinix San Jose - 206.223.116.177\r\nLINX Juniper LAN - 195.66.225.175\r\n\r\nSincerely,\r\nOperations\r\nops@6connect.com\r\n\r\n\r\n6connect, Inc. information:\r\nEquinix Palo Alto, 2001:504:d::33\r\nEquinix Palo Alto, 198.32.176.51\r\n\r\nPeeringDB: http:\/\/as8038.peeringdb.com\/\r\n","status":null,"created":"2014-04-23 10:31:33","modified":"2014-04-23 10:31:33"}]}

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

Required Parameters

None

Optional Parameters


Name
Type
Example
Description
 peer_participant_id INTEGER 1 The numerical id of the peer


Example URL/api/v1/api.php?target=peering&action=getRequests&peer_participant_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  

peerpeer_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  

peerpeer_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  INTEGER

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
DescriptionDelete sessions matching criteria
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


updateSession

URL/api/v1/api.php?target=peering&action=updateSession
DescriptionUpdates session values with any new values specified 
Returns

Examples: 
SUCCESSFUL:{"success":1,"message":"Session updated: 123.net (AS32787\/1.2.3.4) - (AS12129\/206.126.236.70)","data":{"id":"41","source_asn":"32787","source_ipaddr":"1.2.3.4","resource_id":"422","resource_name":"ar1.inoc.com","peer_asn":"12129","peer_name":"123.net","peer_participant_id":"3899","peer_ipaddr":"206.126.236.70","peer_hostname":null,"peer_group":"group a","public_id":"1","public_name":"Equinix Ashburn","ip_type":"ipv4","type":"Peer","state":"not configured","prfx_max":"10","prfx_received":null,"password":"0","note":"Adding an awesome note."}}

ERROR: 

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=updateSession&note=Adding+an+awesome+note.&peer_group=group+a


resestPeerStatus

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

Examples: 
SUCCESSFUL: {"success":1,"message":"1&1 Internet status reset","data":{"id":"262","public_id":"1","asn":"8560","name":"1&1 Internet","qualified":true,"is_peer":0,"request_status":"none","info_prefixes":null,"public_ips":[],"contacts":[],"log_data":[{"message":"Peer status reset","time":"2014-05-22 23:14:54","request_id":null,"session_id":null,"public_id":"1"},{"message":"Peer status reset","time":"2014-05-22 23:14:18","request_id":null,"session_id":null,"public_id":"1"},{"message":"Session deleted: 1&1 Internet (AS32787\/1.2.3.4) - (AS8560\/206.126.236.200)","time":"2014-05-22 22:39:43","request_id":null,"session_id":"71","public_id":"1"},{"message":"Request sent: ","time":"2014-04-12 13:24:43","request_id":"121","session_id":null,"public_id":"1"},{"message":"Session added: 1&1 Internet (AS32787\/1.2.3.4) - (AS8560\/206.126.236.200)","time":"2014-04-07 11:32:37","request_id":null,"session_id":"71","public_id":"1"}]}}

ERROR: {"success":0,"message":"Could not find peer matching parameters"}

Required Parameters


Name
Type
Example
Description
participant_idINTEGER262 The id of the peer in from the peeringDB peerParticipants table.
public_idINTEGER 1 The id of the exchange point from the peeringDB mgmtPublics table.


Optional Parameters

None

Example URL/api/v1/api.php?target=peering&action=resetPeerStatus&participant_id=262&public_id=1


sendRequest

URL/api/v1/api.php?target=peering&action=sendRequest
DescriptionSend a peering request (email) to a prospective peer. This will be deprecated in the next version for a simpler call, strongly suggest against using.
Returns

Examples: 
SUCCESSFUL: {"success":1,"message":"Request sent","data":{"id":"922","public_id":"1","asn":"10933","name":"ATX Communications, Inc.","qualified":true,"is_peer":0,"request_status":"sent","info_prefixes":null,"public_ips":[],"contacts":[],"log_data":[{"message":"Request sent to ","time":"2014-05-27 16:59:01","request_id":"181","session_id":null,"public_id":"1"},{"message":"Request sent to ","time":"2014-05-27 16:49:30","request_id":"171","session_id":null,"public_id":"1"}]}}

ERROR: {"success":0,"message":"Internal error"}

Required Parameters


Name
Type
Example
Description
public_idINTEGER  

peer_participant_idINTEGER  

source_participant_idINTEGER  

peer_nameSTRING  

peer_asnINTEGER  

email_fromSTRING262 
email_toSTRING 1 
subjectSTRING  

bodySTRING  

typeENUMhtmlenum('text','html')
statusENUMsentenum('sent','accepted','rejected')


Optional Parameters

None

Example URL

https://ops.6connect.com/peering-demo/api/v1/api.php?target=peering&action=sendRequest&peer_participant_id=1909&peer_asn=28929&peer_name=ASDASD+srl&source_participant_id=2335&source_asn=8038 &public_id=1&type=text&email_from=ops%406connect.com&email_to=operations%40as28929.net&cc=&bcc=&subject=Peering+request+from+6connect%2C+Inc. &body=%0D%0APeering%2C%0D%0A%0D%0A6connect%2C+Inc.%2C+8038%2C+would+like+to+peer+with+ASDASD+srl+at+our+common+locations.%3A%0D%0APeeringDB%3A+http%3A%2F%2Fas8038.peeringdb.com%2F%0D%0A


sendEmail

URL/api/v1/api.php?target=peering&action=sendEmail
DescriptionSend a peering request (email) to a prospective peer. This will be deprecated in the next version for a simpler call, strongly suggest against using.
Returns

Examples: 
SUCCESSFUL:

ERROR:

Required Parameters


Name
Type
Example
Description
participant_idINTEGER262 
public_idINTEGER 1 


Optional Parameters

None

Example URL 


updatePeer

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

Examples: 
SUCCESSFUL:

ERROR:

Required Parameters


Name
Type
Example
Description
participant_idINTEGER262 
public_idINTEGER 1 


Optional Parameters

None

Example URL