Auto Light Dark
Auto Light Dark

API Module - Peering

APIv1 - Peering Module

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


Peering

getCommunications

Base URL

/api/v1/api.php?target=peering&action=getCommunications

Description

Returns 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_id

INTEGER

1

The unique numerical identifier of the exchange to retrieve peering communicaiton records for.

Optional Parameters

None

Example URL

/api/v1/api.php?target=peering&action=getCommunications&public_id=1

getPeers

URL

/api/v1/api.php?target=peering&action=getPeers

Description

Returns a list of all peers available at an exchange

Returns

Examples: 
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_id

INTEGER

1

The unique numerical identifier of the exchange to retrieve peering communication records for.

id

INT

1

The unique numerical identifier of the peer in peeringDB.

asn

INT

4436


name

STRING

GTT


aka

STRING

nLayer


website

STRING

http://www.gt-t.net


notes_public

STRING



notes_private

STRING



irr_as_set

STRING

AS-NLAYER


info_traffic

ENUM

1 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_ratio

ENUM

Mostly Outbound

enum('Not Disclosed','Heavy Outbound','Mostly Outbound','Balanced','Mostly Inbound','Heavy Inbound') DEFAULT 'Not Disclosed'

info_scope

ENUM

Global

enum('Not Disclosed','Regional','North America','Asia Pacific','Europe','Africa','South America','Global') DEFAULT NULL

info_type

ENUM

NSP

enum('Not Disclosed','NSP','Content','Cable/DSL/ISP','Enterprise','Educational/Research','Non-Profit') DEFAULT 'Not Disclosed'

info_prefixes

INT

10000


info_lookingglass

STRING

http://lg.nlayer.net/


info_routeserver

STRING

telnet://route-server.nlayer.net


info_unicast

CHAR

1


info_multicast

CHAR



info_ipv6

CHAR

1


policy_url

STRING

http://www.gt-t.net/Peering_policies.aspx


policy_general

ENUM

Selective

enum('Open','Selective','Restrictive','No') DEFAULT NULL

policy_locations

ENUM

Required - International

enum('Not Required','Preferred','Required - US','Required - International') DEFAULT NULL

policy_ratio

ENUM

No

enum('Yes','No') DEFAULT NULL

policy_contracts

ENUM

Not Required

enum('Not Required','Private Only','Required') DEFAULT NULL

policy_nopublic

ENUM

N

enum('Y','N') NOT NULL DEFAULT 'N'

policy_noprivate

ENUM

N

enum('Y','N') NOT NULL DEFAULT 'N'

date_created

DATETIME

2013-03-21 15:36:42

Date the peeringdb entry was created

date_lastupdated

DATETIME

2013-03-21 15:36:42

Date the peeringdb entry was last updated

include_public_ips

BOOL

 TRUE

 Returns a list of all public facing IPs

include_contacts

BOOL

TRUE

Returns a list of all contacts associated with peer(s)

include_log_data

BOOL

TRUE

Returns 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

Description

Returns 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":"mail@test.com.com","email_to":"mail@test.com","subject":"Peering request from SomeCo, Inc.","body":"Peering,\r\n\r\nSomeCo, 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\nmail@test.com.com\r\n\r\n\r\nSomeCo, 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

Description

Returns 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_id

INTEGER

1

The unique numerical identifier of the exchange to retrieve peering communicaiton records for.

Optional Parameters

Name

Type

Example

Description

id

INTEGER

41


public_id

INTEGER



source_asn

INTEGER



source_ipaddr

STRING



resource_id

INTEGER



peer_asn

INTEGER



peer_name

STRING



peer_participant_id

INTEGER



peer_ipaddr

STRING



peer_hostname

STRING



peer_group

STRING



password

INTEGER



type

STRING



state

STRING



prfx_max

INTEGER



prfx_received

INTEGER



ip_type

ENUM


enum('ipv4','ipv6') NOT NULL DEFAULT 'ipv4'

note

STRING



created

TIMESTAMP



modified

TIMESTAMP



deleted

INTEGER



public_id

INTEGER



Example URL

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

addSession

URL

/api/v1/api.php?target=peering&action=addSession

Description

Adds 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_ipaddr

STRING



resource_id

INTEGER



peer_asn

INTEGER



peer_name

STRING



peer_participant_id

INTEGER



peer_ipaddr

STRING



peer_hostname

STRING



peer_group

STRING



public_id




type

STRING



ip_type

ENUM


enum('ipv4','ipv6')

state

STRING



prfx_max

INTEGER



note

STRING



Example URL

/api/v1/api.php?target=peering&action=getRequests&peer_participant_id=1

configureSession

URL

/api/v1/api.php?target=peering&action=configureSession

Description

Configure 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_ipaddr

STRING



resource_id

INTEGER



peer_asn

INTEGER



peer_name

STRING



peer_participant_id

INTEGER



peer_ipaddr

STRING



peer_hostname

STRING



peer_group

STRING



public_id




type

STRING



ip_type

ENUM


enum('ipv4','ipv6')

state

STRING



prfx_max

INTEGER



note

STRING



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

Delete 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

id

INTEGER

41


public_id

INTEGER



source_asn

INTEGER



source_ipaddr

STRING



resource_id

INTEGER



peer_asn

INTEGER



peer_name

STRING



peer_participant_id

INTEGER



peer_ipaddr

STRING



peer_hostname

STRING



peer_group

STRING



password

INTEGER



type

STRING



state

STRING



prfx_max

INTEGER



prfx_received

INTEGER



ip_type

ENUM


enum('ipv4','ipv6') NOT NULL DEFAULT 'ipv4'

note

STRING



created

TIMESTAMP



modified

TIMESTAMP



deleted

INTEGER



public_id

INTEGER



Example URL

/api/v1/api.php?target=peering&action=deleteSession&id=171

updateSession

URL

/api/v1/api.php?target=peering&action=updateSession

Description

Updates 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

id

INTEGER

41


public_id

INTEGER



source_asn

INTEGER



source_ipaddr

STRING



resource_id

INTEGER



peer_asn

INTEGER



peer_name

STRING



peer_participant_id

INTEGER



peer_ipaddr

STRING



peer_hostname

STRING



peer_group

STRING



password

INTEGER



type

STRING



state

STRING



prfx_max

INTEGER



prfx_received

INTEGER



ip_type

ENUM


enum('ipv4','ipv6') NOT NULL DEFAULT 'ipv4'

note

STRING



created

TIMESTAMP



modified

TIMESTAMP



deleted

INTEGER



public_id

INTEGER



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_id

INTEGER

262

The id of the peer in from the peeringDB peerParticipants table.

public_id

INTEGER

 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

Description

Send 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_id

INTEGER



peer_participant_id

INTEGER



source_participant_id

INTEGER



peer_name

STRING



peer_asn

INTEGER



email_from

STRING

262


email_to

STRING

 1


subject

STRING



body

STRING



type

ENUM

html

enum('text','html')

status

ENUM

sent

enum('sent','accepted','rejected')

Optional Parameters

None

Example URL

https://ops.test.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%40test.com&email_to=operations%40as28929.net&cc=&bcc=&subject=Peering+request+from+SomeCo%2C+Inc. &body=%0D%0APeering%2C%0D%0A%0D%0ASomeCo%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

Description

Send 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_id

INTEGER

262


public_id

INTEGER

 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_id

INTEGER

262


public_id

INTEGER

 1


Optional Parameters

None

Example URL