Edge Compute
Provides APIs to create, delete, and monitor Edge Compute instances on Edge nodes designed to deliver 5ms or less of latency.
NOTE: To create an Edge Bare Metal Instance, please see page Code Samples
Functional Overview
Welcome to the Lumen Edge Compute API Documentation. The Lumen Edge Platform provides on-demand provisioning, monitoring, and logging of low latency compute nodes. This document describes the Lumen Edge Compute API protocol and the available endpoints. Sections are organized in the same manner as they appear in the UI.
Intended User (Target Audience)
The Edge Compute API's are only for use by existing Edge Platform customers. All Edge customers should request access to the Edge Compute APIs through the API Marketplace. If you do not have an Edge Platform account please reach out to your account manager or activate your account here. Once you have an Edge Platform account you will need to complete the registration process in the API Marketplace that is located here.
Business Benefits
The Edge Compute APIs allow our customers to directly call APIs from their own application instead of having to login to a Lumen system or front end application to get information or complete actions. This enables a more efficient process for provisioning compute instances, monitoring logs, viewing statistics, and managing workloads.
To gain access to the Edge Compute APIs contact your account manager or activate your account here.
To request access to Edge Compute APIs, just follow the steps on this page to register as a user, create your app and request access.
Upon requesting access, once your request has been approved to access APIs, your Consumer Key and Consumer Secret are activated. After that go to the Lumen Edge API Documentation to see code samples and the list of available APIs. In order to access the API endpoints, you need to have an access token which is provided through 'Authentication/Authorization' page.
Again, below are the steps needed to access the Edge Compute APIs.
- Sign up and obtain your credentials for a Lumen Edge Platform account. Activate your account here.
- Register for an API Marketplace account and request access to our Edge Compute API App. Follow the getting started steps here.
- Obtain API keys. Upon enrollment you will receive a Consumer Key and a Consumer Secret to be authenticated.
- Setup Token Authorization. Go to the 'Authentication/Authorization' page for details on obtaining your access token.
- Make your first call. Go to our Lumen Edge API Documentation page to see code samples and the list of APIs available.
* Customer sandbox environment for API testing coming soon in a future release!
Lumen supports the OAuth 2.0 client credentials authorization grant flow for external access by client-side applications.
Only existing Lumen customers can access Edge Compute APIs. Please contact your account manager to begin the enrollment process, or click here to begin the enrollment process. Upon enrollment you will receive instructions on how to get started. Once your application is approved you can go to Credentials, below. For example on getting an Access Token, please see Example Body below.
This endpoint provides authentication for the Lumen Edge Platform user. The response includes a valid access token. If your current token is expired, a new one will be created and returned. As a prerequisite, you will need Lumen Edge Platform and API Marketplace accounts.
- Post to https://api.lumen.com/oauth/v1/token
- Content Type = "
x-www-form-urlencoded"
- In the Body of your Oauth request, have the following
- grant_type = client_credentials
- In Authorization, enter your Applications Tokens received during app enrollment
- Authorization Type = Basic Auth
- username = <Consumer Key>
- password = <Consumer Secret>
Example Body:
Example Authorization:
Example Response:
{
"refresh_token_expires_in": "28799",
"refresh_token_status": "approved",
"api_product_list": "[Edge Compute]",
"api_product_list_json": [
"Edge Compute"
],
"organization_name": "ext",
"developer.email": "example.email@company.com",
"token_type": "Bearer",
"issued_at": "1620229269962",
"client_id": "cxARluuF2Mwg7j6zbdifdJDVhJJDLVqT",
"access_token": "r9fc115e-cba0-49ed-a9c8-e884a0855c2v",
"refresh_token": "202156ea-7378-4b5e-bc56-e1fbcfc61f1h",
"application_name": "a9752f64-2703-9dff-b2e1-0e8c1a8f43r0",
"scope": "",
"refresh_token_issued_at": "1620229269962",
"expires_in": "1799",
"refresh_count": "0",
"status": "approved"
}
To make subsequent API requests after you have the access token from Ouath request, you will need to gather the API Token from Edge Orchestrator Portal and add that token to Header:
Step 1 - Go to User Settings
Step 2 - Click API Access
Step 3 - Regenerate Token
Step 4 - Copy Access Token. This Token will last 1 year. If there is new version of the Edge Orchestration portal, then this token will need to be regenerated
Step 5 - Use Access Token in Header of API Request (morpheusToken Key)
To make subsequent API requests after you have the access token from Ouath request and the Morpheus Token, you will need to place those tokens in the example below. The example below is using the Get Dashboard API:
Example Authorization with Bearer Token
Example Headers with Morpheus Token
Please go to our Lumen Edge API Documentation page for sample requests. Please do not use the ID Codes table in the Edge API Documentation page when creating a Network Instance and a Bare Metal Instance. Please use the ID Code tables you see in this page
Using Edge Compute API, users must create the network instance first and then create the bare metal instance second.
The steps below take you through the API experience of Creating a Network and Creating a Bare Metal Instance to assign the newly created network to.
- Use the Create Instance API for Creating Network Instance
Here is JSON Body request example of the Create an Instance for Network
{
"zoneId": "11",
"instance": {
"name": "NetworkInstanceIPBlockV2",
"site": {
"id": "122"
},
"instanceType": {
"id": 306,
"code": "lumen-network-ip-block"
},
"layout": {
"id": "3962"
},
"plan": {
"id": 4858
}
},
"config": {
"customOptions": {
"edgeLocation": "DLLATX37LEC",
"centuryLinkNetworkType": "EDGE_COMPUTE_INTERNET",
"edgeBandwidth": "100",
"networkName": "NetworkInstanceIPBlockV2",
"NetworkSize": "4858"
}
}
}
In terms of the Parameters, below are the ID Codes:
Zone ID is the Cloud Instance that you are using. All users will use 11
Instance Name (and networkName) is name you are assigning to your Network Instance
Site ID is your Group ID. To get your Group ID, run the Get All Groups API located at http://apidocs.edge.lumen.com/#get-all-groups
The Instance Types:
Name |
Code |
ID |
Lumen Network |
lumen-network-ip-block |
306 |
|
|
|
The Layouts:
Name |
Description |
ID |
LUMEN NETWORK IP BLOCK |
|
3962 |
|
|
|
The Network Plans (used for Plan ID and NetworkSize parameters)
Name |
Plan ID |
Network Size |
Lumen Network IP Block /29 |
4858 |
29 |
Lumen Network IP Block /28 |
4860 |
28 |
Lumen Network IP Block /27 |
4862 |
27 |
Lumen Network IP Block /26 |
4864 |
26 |
Lumen Network IP Block /25 |
4866 |
25 |
Lumen Network IP Block /24 |
4868 |
24 |
|
|
|
For the edgeLocation parameter use ID code table located at: http://apidocs.edge.lumen.com/#locations-table
For the edgeBandwidth parameter use ID code table located at: http://apidocs.edge.lumen.com/#network-type-/-bandwidth
For the centuryLinkNetworkType use EDGE_COMPUTE_INTERNET
This Network instance can be used on multiple bare metal instances, as the network block created allows.
IMPORTANT
In the Response of the Network Instance, capture the Network ID that was created. You will need that ID when you run the Create an Instance for a Bare Metal server. Once a Bare Metal instance is added to a network instance, there currently is not the ability to change the network instance. This functionality will be part of future releases.
- Use the Create Instance API for Creating Bare Metal Instances
Here is JSON Body request example of the Create an Instance for Bare Metal servers.
{
"zoneId": "11",
"instance": {
"name": "API_Instance_v1",
"site": {
"id": "122"
},
"instanceType": {
"code": "lumen-ebm-centos",
"id": "302"
},
"layout": {
"id": "3960"
},
"hostName": "API_Instance_v1",
"plan": {
"id": "1208"
}
},
“type”: “lumen-ebm-centos”,
"config": {
"createUser": true,
"isVpcSelectable": true,
"customOptions": {
"edgeLocation": "DLLATX37LEC",
"networkId":"22712",
"centuryLinkNetworkType": "EDGE_COMPUTE_VPC"
}
}
}
In terms of the Parameters, below are the ID Codes:
Zone ID and Cloud is the Cloud Instance that you are using. All users will use 11
Instance Name is name you are assigning to your Bare Metal Instance
Site ID is your Group ID. To get your Group ID, run the Get All Groups API located at http://apidocs.edge.lumen.com/#get-all-groups
Instance Types:
Name |
Code |
ID |
CentOS - Edge Bare Metal Image |
lumen-ebm-centos |
302 |
Ubuntu - Edge Bare Metal Image |
lumen-ebm-ubuntu |
304 |
|
|
|
Layouts:
Name |
Description |
ID |
18.04 |
Lumen EBM - Ubuntu - 18.04 - amd64 |
3956 |
20.04 |
Lumen EBM - Ubuntu - 20.04 - amd64 |
3958 |
7.9 |
"Lumen EBM - CentOS - 7.9 - amd64 |
3960 |
|
|
|
Server Plans:
Plan |
ID Code |
Ram |
Storage |
CPUs |
Large |
1208 |
768 |
32200 |
32 |
Medium |
1229 |
384 |
7680 |
32 |
Small |
1561 |
128 |
480 |
10 |
|
|
|
|
|
For the edgeLocation parameter use ID code table located at link below.
NOTE: You must use same location that was used for Network Instance: http://apidocs.edge.lumen.com/#locations-table
The instance name and the hostName above plan are the same name that customer gives
For the centuryLinkNetworkType use EDGE_COMPUTE_VPC
For the networkId use the Network ID that was create in step 1 when creating Network Instance.
To add multiple Bare Metal Server Instances to the same Network Instance you can simply repeat the above steps for Create Instance API for Creating Bare Metal Instances using the same Network ID. This process can be repeated as many times as the IP allocation for the IP block created allows.
Error Code | Description |
400 | Bad Request – Your request failed. Check your request parameters and try again. |
401 | Unauthorized – Your API key is invalid. Check your Authorization header. |
403 | Forbidden – Your API key does not have the required role or permissions. |
404 | Not Found – The specified resource could not be found. |
405 | Method Not Allowed – You tried to access a resource with an invalid method. |
406 | Not Acceptable – You requested a format that isn’t json. |
410 | Gone – The entity requested has been removed from our servers. |
429 | Too Many Requests – You’re asking too much of the server. Slow down! |
500 | Internal Server Error – We had a problem with our server. Try again later. |
503 | Service Unavailable – We’re temporarily offline for maintenance. Please try again later. |
For API specific support please complete the support form select Contact Us menu option and you will be prompted to fill out a webform that will be routed to our support team.
For production support question specific to the Edge Compute Services product, log into the Lumen Edge Platform and reach out to support via chat or email.