Megaport offers a public API for access to the services available through the Megaport Portal.
To get started
View the API documentation.
Go to https://dev.megaport.com.
Download the postman API collection.
Go to https://dev.megaport.com/#header-run-in-postman.
Watch an 8-minute video for an introduction to the Megaport API.
This video includes a walk-through of logging in to the Megaport Portal, acquiring documentation such as price lists and an LOA, and using the API in Postman.
Using the API
When you import the API into Postman, create a new Collection and then set up your username and password.
- Download the postman API collection and create a new collection.
- Click Edit next to the imported Megaport collection.
- Select Variables and add a key for username and define the value to be your Megaport Portal username.
- Add another key for password and enter your Megaport Portal password.
- Go to the Collection and select Security > Login with User Details and click Send.
The response JSON object will have a token key.
- Copy the token.
- In the Collection variables, add another key for token and paste the token into the corresponding value field.
The API calls are ready to use.
There are two server environments for the APIs:
The production environment: https://api.megaport.com
You will be liable for any services ordered in this system.
The test environment: https://api-staging.megaport.com
You can perform any action in this system and the API calls and responses mirror the production system, but services will not be deployed. This environment is refreshed periodically and is expected to have lower availability requirements.