1. Home
  2. Help Articles
  3. How to use E2E Networks API?

How to use E2E Networks API?

Once you have created an API token through MyAccount portal, you can start using E2E Networks API.

In-depth documentation of E2E Networks API is available here.

Using E2E Networks API, you can programmatically perform various actions and workflows that you perform using the Graphical User Interface (GUI) of the MyAccount portal.

Example API Requests, using the curl command:

These examples can help you to get started quickly with the E2E Networks API.

Note: If an invalid API token is used, the following error message will appear.
HTTP/1.1 403 Forbidden
{
  "id":   	"forbidden",
  "message":  "You do not have access for the attempted action."
}

List All Actions

To get a list of all actions that have been performed, send a get request to the endpoint

List All Nodes

To get a list of all the nodes available in your account, send a GET request to the endpoint.

curl -X GET 'https://api.e2enetworks.com/myaccount/nodes/v1?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab&page=1&per_page=2' -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJGSjg2R2NGM2pUYk5MT2NvNE52WmtVQ0lVbWZZQ3FvcXRPUWVNZmJoTmxFIn0.eyJqdGkiOiJjYmE3Njc5Zi1mOWFhLTQzZGEtYWNiMi1hNzBlZGEwN2Q3ODkiLCJleHAiOjE1ODc1NDA4MzMsIm5iZiI6MCwiaWF0IjoxNTU2MDA0ODMzLCJpc3MiOiJodHRwOi8vMTcyLjE2LjIxNS45NTo4MDgwL2F1dGgvcmVhbG1zL2FwaW1hbiIsImF1ZCI6ImFwaW1hbiIsInN1YiI6IjMxOWU1ZGExLTZmYzItNDY2ZS1iNDI4LTRmOTViOTRlNDMzMCIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFwaW1hbiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6ImY2YTUxNTQ5LWRkMjYtNDVkYS04YWI0LTlhNTZjOWY3NTUyYyIsImFjciI6IjEiLCJjbGllbnRfc2Vzc2lvbiI6IjViOWJlMjY4LWE1ZDAtNGMxMC05NWQ0LTdhNzU5NTNkODlhMCIsImFsbG93ZWQtb3JpZ2lucyI6WyIqIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJ1bWFfYXV0aG9yaXphdGlvbiIsImFwaXVzZXIiXX0sInJlc291cmNlX2FjY2VzcyI6eyJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50Iiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXIrMUBlMmVuZXR3b3Jrcy5jb20iLCJnaXZlbl9uYW1lIjoiQXdhZGhlc2giLCJmYW1pbHlfbmFtZSI6Ikt1bWFyIiwiZW1haWwiOiJhd2FkaGVzaC5rdW1hcisxQGUyZW5ldHdvcmtzLmNvbSJ9.Hp9VED8hYAbF9XbNQn_WyhCHUim2ui5jNdSRG_lP9B_7gU1YXLsHotupJr3iEJb7FC1XbeoKobwv9PpPJOtyiNUvEPWBza5ir_U737ujdD-NYSzUX-412sTqktjdKqcR78XfpmCIDE-5MeHf5cC3atSvP20XGh4T7d1CeL3oSRE' 

Create a Node

To create a new node, send a POST request to the endpoint. For information on the attributes required and valid values for those attributes, you can refer to the in-depth API documentation here.

Following example requests a CentOS-6.10-Distro node named ‘node-awa’ with the 8GB RAM plan in the NCR datacenter.

curl -X POST \
  'https://api.e2enetworks.com/myaccount/api/v1/nodes/?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiJmYmFiOTk3YS03ZGQzLTQxN2YtOWY5Mi1kM2FjMGEyOTViOGYiLCJleHAiOjE2MDE0NjA3NDQsIm5iZiI6MCwiaWF0IjoxNTY5OTI0NzQ0LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5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-Token: 5a201495-93c9-437d-ae64-ca50e4082bb1' \
  -H 'cache-control: no-cache' \
  -d '{"name":"abc",
"region":"ncr",
"plan":"C-2vCPU-8RAM-60DISK-C2.8GB-CentOS-7.5",
"image":"CentOS-7.5-Distro",
"ssh_keys":["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC88ZxOCzW1wP/MRJXdtLmzEgPfVhvHJsrheWtPcsG5qXJ2ztUqSCEIky58qIbbcBnDPySkXMj+VqPKIXcMeV2KwOQnXS2R3uoO0gHcTEux5IDdmqcEVTmEP3tb0V7EJecLbRDm8uuox+cjCvLSGEB5bIGhUm8a6kDs+xFpOHgKm4JcF9Vpvev7BjIYWaaLNh5+lCm3uM0t/mGRGacv6mSbm7PXGI2MC7aL2EQdb7/OJe81O6qg9wwNyyrmgAnkYh8yhexIUVzYDO2pKK5IJrp1qZlJQap054h2ihW7u22CQSe9nEwDdNsaFjUwN5eWkUGlhLTNbyl+O2w2a7oNeV e2e@e2e-HP-Laptop-15-da0xxx"],
"backups":false,
"disable_password":true}'
Updated on October 4, 2019

Was this article helpful?

Related Articles

Add A Comment