Use the Networks API to create, view, update, and delete Border Gateway Protocol (BGP) peer groups for your Bare Metal Cloud (BMC) servers.
All API requests in this guide are relative to:
https://api.phoenixnap.com/networks/v1Code language: HTTP (http)
Prerequisites
BMC API access token with the bmc scope (see API Credentials).
Create a BGP Peer Group
Send a POST request to:
POST /bgp-peer-groupsCode language: HTTP (http)
Provide the location in the request body. For example:
{
"location": "PHX"
}Code language: JSON / JSON with Comments (json)
Other fields include the peer group ASN, advertised routes, and the BGP peer group password. Omitting asn defaults to the 65401 (phoenixNAP ASN), while the default value for advertisedRoutes is NONE.
If no password is provided, the system automatically generates one and returns it in the response.
Find out more
View BGP Peer Groups
To view all BGP peer groups, use:
GET /bgp-peer-groupsCode language: HTTP (http)
To view a single group, provide its ID:
GET /bgp-peer-groups/[BGP_PEER_GROUP_ID]Code language: HTTP (http)
Find out more
Networks API - GET /bgp-peer-groups
Networks API - GET /bgp-peer-groups/[BGP_PEER_GROUP_ID]
Update a BGP Peer Group
Send a PATCH request to:
PATCH /bgp-peer-groups/[BGP_PEER_GROUP_ID]Code language: HTTP (http)
Replace [BGP_PEER_GROUP_ID] with the actual BGP peer group ID. Use the request body to update values:
{
"asn": [ASN],
"password": "[PASSWORD]",
"advertisedRoutes": "[VALUE]"
}Code language: JSON / JSON with Comments (json)
Update the ASN, password, or adjust the advertised routes value.
Delete BGP Peer Group
Send a DELETE request to:
DELETE /bgp-peer-groups/[BGP_PEER_GROUP_ID]Code language: HTTP (http)
Replace [BGP_PEER_GROUP_ID] with the actual ID.