-
Release Notes
- July 8, 2024
- May 22, 2024
- April 17, 2024
- March 20, 2024
- February 22, 2024
- January 18, 2024
- 2023 Releases
- 2022 Releases
-
2021 Releases
- December 20, 2021
- December 1, 2021
- November 22, 2021
- November 4, 2021
- October 26, 2021
- September 30, 2021
- September 22, 2021
- September 2, 2021
- August 16, 2021
- August 2, 2021
- July 19, 2021
- July 1, 2021
- June 17, 2021
- June 1, 2021
- April 30, 2021
- April 8, 2021
- March 25, 2021
- March 15, 2021
- February 25, 2021
- February 8, 2021
- January 28, 2021
- January 21, 2021
- January 13, 2021
- 2020 Releases
- Getting Started
- Ports
- Cross Connects
- Point-to-Point
- Virtual Circuits
- Cloud Connections
- Cloud Router
- Marketplace & IX
- Administration
- Billing
- Troubleshooting & FAQ
- Technical Reference
- Partners Portal
- API & Automation
Provision a Cloud Router via the API
Before you begin
Ensure you have a bearer token authorizing all your API calls. For information on authorizing calls, see one of the following pages:
- Using Postman with the PacketFabric API
- Using cURL with the PacketFabric API
- Using Python Requests with the PacketFabric API
API reference
Parameters and attributes
To provision a Cloud Router, you will need the following information:
- Header row
- Parameter
- Required
- Description
- Row 1
account_uuid
string- Yes
- Billing account ID (see below).
- Row 1
name
string- Yes
- Brief description of the connection.
- Row 1
-
capacity
string -
Yes
-
The total capacity for this Cloud Router. You can later upgrade if you decide you need more capacity.
Your options are 100Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, 10Gbps, 20Gbps, 30Gbps, 40Gbps, 50Gbps, 60Gbps, 80Gbps, 100Gbps, >100Gbps.
-
- Row 1
-
asn
integer -
No
-
The ASN of the Cloud Router.
This can be the PacketFabric public ASN 4556 (default) or a private ASN from 64512 - 65534. Defaults to 4556 if unspecified.
-
- Row 1
-
regions
array of strings -
No
-
Use
["US"]
for North America and["UK"]
for EMEA. For transatlantic, use["US", "UK"]
.The default is
US
.
-
- Row 1
published_quote_line_uuid
string- No
- The UUID of the published quote line with which this connection should be associated.
Find the billing account ID
For information on finding your billing account ID, see Get the Account UUID.
Provision a Cloud Router
Postman
-
Open Postman and click the plus icon to add a new request.
-
Select POST from the drop-down menu that appears before the URL field.
-
Enter the following API call into the URL field:
https://api.packetfabric.com/v2/services/cloud-routers
-
Select the Body subtab and then select raw. Select JSON from the drop-down menu (see below for an example that you can copy and paste):
-
In the space below, set your parameters. For example (include the curly brackets):
-
Click Send.
If the request is successful, the response will include detailed information about your connection, including the circuit ID for this connection. You can use the circuit ID in other API requests to manage the connection.
JSON sample
Here is a JSON sample for you to copy and then modify accordingly:
{
"asn": 64514,
"name": "Super Cool Cloud router",
"account_uuid": "your-account-uuid",
"regions": [
"US",
"UK"
],
"capacity": "10Gbps",
}
cURL
curl -X POST https://api.packetfabric.com/v2/services/cloud-routers -d @api.json -H "accept: */*" -H "Authorization: Bearer replace_with_api_key"
With the contents of api.json
similar to the following (modified to include your information):
{
"asn": 64514,
"name": "Super Cool Cloud router",
"account_uuid": "your-account-uuid",
"regions": [
"US",
"UK"
],
"capacity": "10Gbps",
}
Requests
import requests
api_key = 'replace_with_api_key'
request_header = {
'Authorization': f'Bearer {api_key}'
}
post_url = 'placeholder_api.packetfabric.com/v2/services/cloud-routers'
post_json = {
"asn": 64514,
"name": "Super Cool Cloud router",
"account_uuid": "your-account-uuid",
"regions": [
"US",
"UK"
],
"capacity": "10Gbps",
}
api = requests.post(post_url, json=post_json, headers=request_header)
print(api)
Updated on 13 Jul 2022