The Bare Metal Cloud (BMC) APIs lets you provision and manage servers and related resources from code instead of the portal. They are a collection of REST APIs with OAuth 2.0 authentication, and each API covers one area, such as server, network, or IP management.
Use them to automate deployments and to build server management into your own application and DevOps pipelines.
Available APIs
All APIs are relative to:
https://api.phoenixnap.comCode language: HTTP (http)
Each path identifies the API and its version. The following table lists all the available APIs, their paths, and use case:
| API | Use Case | Path |
|---|---|---|
| Audit Log | Monitor and track actions completed through the API or the portal. | /audit/v1/ |
| Bare Metal Cloud | Provision, de-provision, power on and off, reboot, and shut down servers. Manage SSH keys, allocate public IPs, and assign servers to networks. | /bmc/v1/ |
| Billing | Automate billing through reserations, server usage, and auto renewal control. Check product availability. | /billing/v1/ |
| Invoicing | Manage, pay, and download invoices. | /invoicing/v1/ |
| IP Addresses | Buy and manage public IP blocks, and assign them to servers and networks. | /ips/v1/ |
| Location | List the data center locations and available product categories. | /location-api/v1/ |
| Network Storage | Create and manage network file storage and volumes. | /network-storage/v1/ |
| Networks | Manage private networks, public networks, and BGP peer groups. | /networks/v1/ |
| Payments | Query transactions and review payment history. | /payments/v1/ |
| Rancher Solution | Deploy, operate, and manage Kubernetes clusters through Rancher. | /solutions/rancher/v1beta/ |
| Tag Manager | Organize resources with tags. | /tag-manager/v1/ |
For endpoint details, request, and response fields, use the Developer Portal.
Authentication
BMC APIs use OAuth 2.0 authentication. It works in three parts:
- API credentials. Use the portal to create API credentials. Each set has a Client ID, a Client Secret, and permission scopes that set what the credentials can do. You can create several sets with different permissions.
- Access token. The Client ID and Client Secret are exchanged for an access token from
auth.phoenixnap.com. The token is valid for 15 minutes, so request a new one if it expires. - Authorized requests. You use the token to authorize requests to the API.
Find out more
Ways to Call the APIs
You can call the API in the following ways:
| Method | Use Case |
|---|---|
| Developer Portal | Read the API documentation and run requests from the documentation pages. |
| CLI | Call the API from the terminal and from automation scripts using a CLI tool. |
| Integrations | Manage BMC resources with automation tools. |
| Direct requests | Send HTTP requests from your own code to the API paths. |