Save Image

To Save Image of existing Node send a POST request to the endpoint

https://api.e2enetworks.com/myaccount/api/v1/nodes/<$NODE_ID>/actions/?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab

Set the “type” attribute to save_images .

List all Images

# Name Type Description Required
1 type String Name of node images TRUE
2 name string The name of the save image. TRUE

CURL

curl -X POST 'https://api.e2enetworks.com/myaccount/api/v1/nodes/169/actions/?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab' -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJGSjg2R2NGM2pUYk5MT2NvNE52WmtVQ0lVbWZZQ3FvcXRPUWVNZmJoTmxFIn0.eyJqdGkiOiJjYmE3Njc5Zi1mOWFhLTQzZGEtYWNiMi1hNzBlZGEwN2Q3ODkiLCJleHAiOjE1ODc1NDA4MzMsIm5iZiI6MCwiaWF0IjoxNTU2MDA0ODMzLCJpc3MiOiJodHRwOi8vMTcyLjE2LjIxNS45NTo4MDgwL2F1dGgvcmVhbG1zL2FwaW1hbiIsImF1ZCI6ImFwaW1hbiIsInN1YiI6IjMxOWU1ZGExLTZmYzItNDY2ZS1iNDI4LTRmOTViOTRlNDMzMCIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFwaW1hbiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6ImY2YTUxNTQ5LWRkMjYtNDVkYS04YWI0LTlhNTZjOWY3NTUyYyIsImFjciI6IjEiLCJjbGllbnRfc2Vzc2lvbiI6IjViOWJlMjY4LWE1ZDAtNGMxMC05NWQ0LTdhNzU5NTNkODlhMCIsImFsbG93ZWQtb3JpZ2lucyI6WyIqIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJ1bWFfYXV0aG9yaXphdGlvbiIsImFwaXVzZXIiXX0sInJlc291cmNlX2FjY2VzcyI6eyJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50Iiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXIrMUBlMmVuZXR3b3Jrcy5jb20iLCJnaXZlbl9uYW1lIjoiQXdhZGhlc2giLCJmYW1pbHlfbmFtZSI6Ikt1bWFyIiwiZW1haWwiOiJhd2FkaGVzaC5rdW1hcisxQGUyZW5ldHdvcmtzLmNvbSJ9.Hp9VED8hYAbF9XbNQn_WyhCHUim2ui5jNdSRG_lP9B_7gU1YXLsHotupJr3iEJb7FC1XbeoKobwv9PpPJOtyiNUvEPWBza5ir_U737ujdD-NYSzUX-412sTqktjdKqcR78XfpmCIDE-5MeHf5cC3atSvP20XGh4T7d1CeL3oSRE'-H 'Content-Type: application/json' -d '{
 "type": "save_images",
  "name": "nifty-save-image-name"
}'

PHP

1. PHP HttpRequest Example

       $request = new HttpRequest();
$request->setUrl('http://api.e2enetworks.com//myaccount/api/v1/nodes/34339/actions/');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'apikey' => '395329a6-f1c8-4a9b-bad1-1626f13ce0e6'
));

$request->setHeaders(array(
  'content-type' => 'application/json',
  'authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A'
));

$request->setBody('{
        "type" : "save_images",
        "name" : "testsaveimage"
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}





2. PHP pecl_http Example

       $client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{
        "type" : "save_images",
        "name" : "testsaveimage"
}');

$request->setRequestUrl('http://api.e2enetworks.com//myaccount/api/v1/nodes/34339/actions/');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'apikey' => '395329a6-f1c8-4a9b-bad1-1626f13ce0e6'
)));

$request->setHeaders(array(
  'content-type' => 'application/json',
  'authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();




3. PHP CURL Example

       $curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://api.e2enetworks.com//myaccount/api/v1/nodes/34339/actions/?apikey=395329a6-f1c8-4a9b-bad1-1626f13ce0e6",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"type\" : \"save_images\",\n\t\"name\" : \"testsaveimage\"\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLC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p47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A",
      "content-type: application/json",
    ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

NODEJS

1. Nodejs Native Example

      var http = require("http");

var options = {
  "method": "POST",
  "hostname": "api.e2enetworks.com",
  "port": null,
  "path": "//myaccount/api/v1/nodes/34339/actions/?apikey=395329a6-f1c8-4a9b-bad1-1626f13ce0e6",
  "headers": {
    "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ type: 'save_images', name: 'testsaveimage' }));
req.end();





2. NodeJs Request Example

      var request = require("request");

var options = { method: 'POST',
  url: 'http://api.e2enetworks.com//myaccount/api/v1/nodes/34339/actions/',
  qs: { apikey: '395329a6-f1c8-4a9b-bad1-1626f13ce0e6' },
  headers:
   {   'content-type': 'application/json',
     authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1j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W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A' },
  body: { type: 'save_images', name: 'testsaveimage' },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});







3. NodeJs Unirest Example

      var unirest = require("unirest");
var req = unirest("POST", "http://api.e2enetworks.com//myaccount/api/v1/nodes/34339/actions/");

req.query({
  "apikey": "395329a6-f1c8-4a9b-bad1-1626f13ce0e6"
});

req.headers({
  "postman-token": "931d7e7d-ebec-e652-b201-b0ef36bbad6d",
  "cache-control": "no-cache",
  "content-type": "application/json",
  "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A"
});

req.type("json");
req.send({
  "type": "save_images",
  "name": "testsaveimage"
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

Headers

Request Headers

Content-Type: application/json
Authorization: Bearer b7d03a6947b217efb6f3ec3bd3504582

Response Headers

content-type: application/json; charset=utf-8
status: 200 OK

Body

Response Body

{
   "message": "Success",
   "code": 200,
   "data": {
       "id": 773,
       "created_at": "2019-10-31T06:13:47.613831Z",
       "status": "done",
       "action_type": "save_images",
       "resource_id": "34339"
   },
   "errors": {}
}

Saved Image Listing

To get the list of Saved Image in your MyAccount, send a GET request to the endpoint https://api.e2enetworks.com/myaccount/api/v1/images/?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab.

The response returns an array of JSON objects; each JSON object represents the information of each saved image.

The JSON objects contain the following attributes:

# Name Type Description
1 image_state String State of the image
2 name String The name of the saved image.
3 running_vms integer Running VM count with this image
4 creation_time String The time when node created represented in ISO8601 which includes both the date and time.
5 image_id integer The ID of the saved image.
6 vm_info String Running VM’s Information
7 image_size String Size of the image in GB
8 os_distribution String The name of the saved image.
9 template_id integer The template id of the image
10 distro String The Distro details of the image

CURL

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

PHP

1. PHP HttpRequest Example

       $request = new HttpRequest();
$request->setUrl('http://api.e2enetworks.com//myaccount/api/v1/images/saved-images/');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'apikey' => '395329a6-f1c8-4a9b-bad1-1626f13ce0e6'
));

$request->setHeaders(array(
 'content-type' => 'application/json',
  'authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A'
));

$request->setBody('{
  "type": "rename",
  "name": "testing4test"
}
');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}





2. PHP pecl_http Example

       $client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{
  "type": "rename",
  "name": "testing4test"
}
');

$request->setRequestUrl('http://api.e2enetworks.com//myaccount/api/v1/images/saved-images/');
$request->setRequestMethod('GET');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'apikey' => '395329a6-f1c8-4a9b-bad1-1626f13ce0e6'
)));

$request->setHeaders(array(
  'content-type' => 'application/json',
  'authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();




3. PHP CURL Example

       $curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://api.e2enetworks.com//myaccount/api/v1/images/saved-images/?apikey=395329a6-f1c8-4a9b-bad1-1626f13ce0e6",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "{\r\n  \"type\": \"rename\",\r\n  \"name\": \"testing4test\"\r\n}\r\n",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2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59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A",
    "cache-control: no-cache",
    "content-type: application/json",
    "postman-token: c4b090aa-1ec8-9696-9c6c-db146ab04bba"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

NODEJS

1. Nodejs Native Example

      var http = require("http");

var options = {
  "method": "GET",
  "hostname": "api.e2enetworks.com",
  "port": null,
  "path": "//myaccount/api/v1/images/saved-images/?apikey=395329a6-f1c8-4a9b-bad1-1626f13ce0e6",
  "headers": {
    "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A",
    "content-type": "application/json",
   }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ type: 'rename', name: 'testing4test' }));
req.end();





2. NodeJs Request Example

      var request = require("request");

var options = { method: 'GET',
  url: 'http://api.e2enetworks.com//myaccount/api/v1/images/saved-images/',
  qs: { apikey: '395329a6-f1c8-4a9b-bad1-1626f13ce0e6' },
  headers:
   { 'content-type': 'application/json',
     authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhs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RsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A' },
  body: { type: 'rename', name: 'testing4test' },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});






3. NodeJs Unirest Example

      var unirest = require("unirest");

var req = unirest("GET", "http://api.e2enetworks.com//myaccount/api/v1/images/saved-images/");

req.query({
  "apikey": "395329a6-f1c8-4a9b-bad1-1626f13ce0e6"
});

req.headers({
 "content-type": "application/json",
  "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A"
});

req.type("json");
req.send({
  "type": "rename",
  "name": "testing4test"
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

Headers

Request Headers

Content-Type: application/json
Authorization: Bearer b7d03a6947b217efb6f3ec3bd3504582

Response Headers

content-type: application/json; charset=utf-8
status: 200 OK

Body

Response Body

{
    "message": "Success",
    "code": 200,
    "data": [
        {
            "image_state": "Ready",
            "name": "test-disk-0",
            "running_vms": "0",
            "creation_time": "31-10-2019 11:59:58",
            "image_id": "2292",
            "vm_info": null,
            "image_size": "57 GB",
            "os_distribution": "test",
            "template_id": "3638",
            "distro": "CentOS-7.5"
        }
    ],
    "errors": {}
}

Rename Saved Image

Send a POST request to the endpoint to rename a saved image from your MyAccount. https://api.e2enetworks.com/myaccount/api/v1/images/<$IMAGE_ID>/?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab.

# Name Type Description Required
1 action_type String Must be rename TRUE
2 name String The new name of the saved image. TRUE

CURL

curl -X POST 'https://api.e2enetworks.com/myaccount/api/v1/images/519/?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab' -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJGSjg2R2NGM2pUYk5MT2NvNE52WmtVQ0lVbWZZQ3FvcXRPUWVNZmJoTmxFIn0.eyJqdGkiOiJjYmE3Njc5Zi1mOWFhLTQzZGEtYWNiMi1hNzBlZGEwN2Q3ODkiLCJleHAiOjE1ODc1NDA4MzMsIm5iZiI6MCwiaWF0IjoxNTU2MDA0ODMzLCJpc3MiOiJodHRwOi8vMTcyLjE2LjIxNS45NTo4MDgwL2F1dGgvcmVhbG1zL2FwaW1hbiIsImF1ZCI6ImFwaW1hbiIsInN1YiI6IjMxOWU1ZGExLTZmYzItNDY2ZS1iNDI4LTRmOTViOTRlNDMzMCIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFwaW1hbiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6ImY2YTUxNTQ5LWRkMjYtNDVkYS04YWI0LTlhNTZjOWY3NTUyYyIsImFjciI6IjEiLCJjbGllbnRfc2Vzc2lvbiI6IjViOWJlMjY4LWE1ZDAtNGMxMC05NWQ0LTdhNzU5NTNkODlhMCIsImFsbG93ZWQtb3JpZ2lucyI6WyIqIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJ1bWFfYXV0aG9yaXphdGlvbiIsImFwaXVzZXIiXX0sInJlc291cmNlX2FjY2VzcyI6eyJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50Iiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXIrMUBlMmVuZXR3b3Jrcy5jb20iLCJnaXZlbl9uYW1lIjoiQXdhZGhlc2giLCJmYW1pbHlfbmFtZSI6Ikt1bWFyIiwiZW1haWwiOiJhd2FkaGVzaC5rdW1hcisxQGUyZW5ldHdvcmtzLmNvbSJ9.Hp9VED8hYAbF9XbNQn_WyhCHUim2ui5jNdSRG_lP9B_7gU1YXLsHotupJr3iEJb7FC1XbeoKobwv9PpPJOtyiNUvEPWBza5ir_U737ujdD-NYSzUX-412sTqktjdKqcR78XfpmCIDE-5MeHf5cC3atSvP20XGh4T7d1CeL3oSRE'-H 'Content-Type: application/json' -d '{
 "action_type": "rename",
“Name”: “new-name”
}'

PHP

1. PHP HttpRequest Example

       $request = new HttpRequest();
$request->setUrl('http://api.e2enetworks.com//myaccount/api/v1/images/2294/');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'apikey' => '395329a6-f1c8-4a9b-bad1-1626f13ce0e6'
));

$request->setHeaders(array(
  'content-type' => 'application/json',
  'authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A'
));

$request->setBody('{
        "action_type":"rename",
        "name":"my-zabbix-image"
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}





2. PHP pecl_http Example


$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{
        "action_type":"rename",
        "name":"my-zabbix-image"
}');

$request->setRequestUrl('http://api.e2enetworks.com//myaccount/api/v1/images/2294/');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'apikey' => '395329a6-f1c8-4a9b-bad1-1626f13ce0e6'
)));

$request->setHeaders(array(
  'content-type' => 'application/json',
  'authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();





3. PHP CURL Example

       $curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://api.e2enetworks.com//myaccount/api/v1/images/2294/?apikey=395329a6-f1c8-4a9b-bad1-1626f13ce0e6",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"action_type\":\"rename\",\n\t\"name\":\"my-zabbix-image\"\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJ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HIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A",
    "cache-control: no-cache",
    "content-type: application/json",
    "postman-token: e7f14c48-efc8-ad23-6fd5-c0fbe096d39e"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

NODEJS

1. Nodejs Native Example

      var http = require("http");
var options = {
  "method": "POST",
  "hostname": "api.e2enetworks.com",
  "port": null,
  "path": "//myaccount/api/v1/images/2294/?apikey=395329a6-f1c8-4a9b-bad1-1626f13ce0e6",
  "headers": {
    "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ action_type: 'rename', name: 'my-zabbix-image' }));
req.end();






2. NodeJs Request Example

      var request = require("request");

var options = { method: 'POST',
  url: 'http://api.e2enetworks.com//myaccount/api/v1/images/2294/',
  qs: { apikey: '395329a6-f1c8-4a9b-bad1-1626f13ce0e6' },
  headers:
   { 'content-type': 'application/json',
     authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1h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0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A' },
  body: { action_type: 'rename', name: 'my-zabbix-image' },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});







3. NodeJs Unirest Example

      var unirest = require("unirest");

var req = unirest("POST", "http://api.e2enetworks.com//myaccount/api/v1/images/2294/");

req.query({
  "apikey": "395329a6-f1c8-4a9b-bad1-1626f13ce0e6"
});

req.headers({
 "content-type": "application/json",
  "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A"
});

req.type("json");
req.send({
  "action_type": "rename",
  "name": "my-zabbix-image"
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

Headers

Request Headers


Content-Type: application/json Authorization: Bearer b7d03a6947b217efb6f3ec3bd3504582

Response Headers

content-type: application/json; charset=utf-8
status: 200 OK

Body

Response Body

{
   "message": "Success",
   "code": 200,
   "data": {
       "status": true,
       "message": "Image name changed successfully"
   },
   "errors": {}
}

Delete Saved Image

Send a POST request to the endpoint to delete a saved image from your MyAccount. https://api.e2enetworks.com/myaccount/api/v1/images/<$IMAGE_ID>/?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab.

# Name Type Description Required
1 action_type String Must be delete_image TRUE

CURL

curl -X POST 'https://api.e2enetworks.com/myaccount/api/v1/images/519/?apikey=10581cd6-3bb6-4b4c-a5fb-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9.Hp9VED8hYAbF9XbNQn_WyhCHUim2ui5jNdSRG_lP9B_7gU1YXLsHotupJr3iEJb7FC1XbeoKobwv9PpPJOtyiNUvEPWBza5ir_U737ujdD-NYSzUX-412sTqktjdKqcR78XfpmCIDE-5MeHf5cC3atSvP20XGh4T7d1CeL3oSRE'-H 'Content-Type: application/json' -d '{
 "action_type": "delete_image",
}'

PHP

1. PHP HttpRequest Example

       $request = new HttpRequest();
$request->setUrl('http://api.e2enetworks.com//myaccount/api/v1/images/2294/');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'apikey' => '395329a6-f1c8-4a9b-bad1-1626f13ce0e6'
));

$request->setHeaders(array(
  'content-type' => 'application/json',
  'authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A'
));

$request->setBody('{
  "action_type": "delete_image"
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}






2. PHP pecl_http Example

       $client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{
  "action_type": "delete_image"
}');

$request->setRequestUrl('http://api.e2enetworks.com//myaccount/api/v1/images/2294/');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'apikey' => '395329a6-f1c8-4a9b-bad1-1626f13ce0e6'
)));

$request->setHeaders(array(
  'content-type' => 'application/json',
  'authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QR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BFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();





3. PHP CURL Example

       $curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://api.e2enetworks.com//myaccount/api/v1/images/2294/?apikey=395329a6-f1c8-4a9b-bad1-1626f13ce0e6",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n  \"action_type\": \"delete_image\"\r\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A",
    "content-type: application/json",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

NODEJS

1. Nodejs Native Example

      var http = require("http");

var options = {
  "method": "POST",
  "hostname": "api.e2enetworks.com",
  "port": null,
  "path": "//myaccount/api/v1/images/2294/?apikey=395329a6-f1c8-4a9b-bad1-1626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7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A",
    "content-type": "application/json",  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ action_type: 'delete_image' }));
req.end();






2. NodeJs Request Example

      var request = require("request");

var options = { method: 'POST',
  url: 'http://api.e2enetworks.com//myaccount/api/v1/images/2294/',
  qs: { apikey: '395329a6-f1c8-4a9b-bad1-1626f13ce0e6' },
  headers:
   {  'content-type': 'application/json',
     authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJjejBXYVVKVF9wWmE5MXNpRl9QRXVxUUpqdm5VODhsMXdsVmNla1ZiUXBRIn0.eyJqdGkiOiI0NDJhMTM3NS1jNmM1LTQyNzMtODQyMi1hODNlNjNjMjY0N2YiLCJleHAiOjE2MDMzNjA1NTYsIm5iZiI6MCwiaWF0IjoxNTcxODI0NTU2LCJpc3MiOiJodHRwOi8vZ2F0ZXdheS5lMmVuZXR3b3Jrcy5jb20vYXV0aC9yZWFsbXMvYXBpbWFuIiwiYXVkIjoiYXBpbWFudWkiLCJzdWIiOiI1NTcyZTk0Ni0zMTMyLTQ4YjktYjQ3OC1jMWU4ZWI1MTIwZWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJhcGltYW51aSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjczODBiOTBkLWY3NzMtNDE5NC1iNzdkLTUxZjcxNjM1ZTA3YiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJhcGl1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIiwiZ2l2ZW5fbmFtZSI6IkF3YWRoZXNoIiwiZmFtaWx5X25hbWUiOiJLdW1hciIsImVtYWlsIjoiYXdhZGhlc2gua3VtYXJAZTJlbmV0d29ya3MuY29tIn0.s_HNZ6RNSu4YqX9WPaLOWrSCngczdIcmnCFu0jXke7PFKnoTrvYhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A' },
  body: { action_type: 'delete_image' },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});







3. NodeJs Unirest Example

      var unirest = require("unirest");

var req = unirest("POST", "http://api.e2enetworks.com//myaccount/api/v1/images/2294/");

req.query({
  "apikey": "395329a6-f1c8-4a9b-bad1-1626f13ce0e6"
});

req.headers({
  "content-type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YhVuj4bFVzTRljmunG7DyTuGQ731vf67VJGqaqstgz1YM94Efh9rMjbtKlajtvJ9BJ_t9b51EEpxdnDsweYNfOB2JAlhbYEIHBFQ9sFKhK0j12NRsGA1W1xoxKl0KRWQ1PizJ89gbn3r54JJkbKjXuFl5bz-W4RwFmW7685SJDeTZdJYM0ZoAt9uUw0VG59iPkp47ZH01nhoNXaezqBCH2iWPsJ2WSWVD-uIHcy_0rnUE4rEM01phTgjoy1lMtnyG5DyHIUkHkzzbE7BPwDnDbcIlMF6LLdD4X5A"
});

req.type("json");
req.send({
  "action_type": "delete_image"
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

Headers

Request Headers

Content-Type: application/json
Authorization: Bearer b7d03a6947b217efb6f3ec3bd3504582

Response Headers

content-type: application/json; charset=utf-8
status: 200 OK

Body

Response Body

{
   "message": "Success",
   "code": 200,
   "data": {
       "status": true,
       "message": "Image deleted successfully"
   },
   "errors": {}
}

Image List of Save Image

To get the list of Image for particular saved image in your MyAccount, send a GET request to the endpoint https://api.e2enetworks.com/myaccount/api/v1/images/ upgradeimage/<$TEMPLATE_ID>/?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab.

The response returns an array of JSON objects; each JSON object represents the information of each image.

The JSON objects contain the following attributes:

# Name Type Description
1 name String Name of node images
2 plan String The unique slug identifier for the plan of this node image
3 image String Base image name for node creation.
4
OS Nmae
Version Image Category
JSON String
String String String
Operating system Details like name of os, version of os, unique identifier for image os name and category name.
5 Zone slug_name JSON String In which zone image is available to launch node.
6
Specs sku_name
ram (in GB) cpu (in Cores) disk_space(in GB) price_per_month(in Rs) price_per_hour (in Rs) Series minimum_billing_amount (in Rs) Commited_skus family
JSON String
String String String String String String String String String
Image Specification like there
7 cpu_type String  

CURL

curl -X GET  'https://api.e2enetworks.com/myaccount/api/v1/images/upgradeimage/4165/?apikey=10581cd6-3bb6-4b4c-a5fb-79a75b61ecab'  -H 'Authorization: Bearer eyJhbGciOiJSU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dSRG_lP9B_7gU1YXLsHotupJr3iEJb7FC1XbeoKobwv9PpPJOtyiNUvEPWBza5ir_U737ujdD-NYSzUX-412sTqktjdKqcR78XfpmCIDE-5MeHf5cC3atSvP20XGh4T7d1CeL3oSRE'
-H 'Content-Type: application/json'
}'

PHP

PHP HttpRequest Example

       $request = new HttpRequest();
$request->setUrl('https://api.e2enetworks.com/myaccount/api/v1/images/upgradeimage/4165/');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'apikey' => '10581cd6-3bb6-4b4c-a5fb-79a75b61ecab'
));

$request->setHeaders(array(
  'content-type' => 'application/json',
  'Authorization' => 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJGSjg2R2NGM2pUYk5MT2NvNE52WmtVQ0lVbWZZQ3FvcXRPUWVNZmJoTmxFIn0.eyJqdGkiOiJjYmE3Njc5Zi1mOWFhLTQzZGEtYWNiMi1hNzBlZGEwN2Q3ODkiLCJleHAiOjE1ODc1NDA4MzMsIm5iZiI6MCwiaWF0IjoxNTU2MDA0ODMzLCJpc3MiOiJodHRwOi8vMTcyLjE2LjIxNS45NTo4MDgwL2F1dGgvcmVhbG1zL2FwaW1hbiIsImF1ZCI6ImFwaW1hbiIsInN1YiI6IjMxOWU1ZGExLTZmYzItNDY2ZS1iNDI4LTRmOTViOTRlNDMzMCIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFwaW1hbiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6ImY2YTUxNTQ5LWRkMjYtNDVkYS04YWI0LTlhNTZjOWY3NTUyYyIsImFjciI6IjEiLCJjbGllbnRfc2Vzc2lvbiI6IjViOWJlMjY4LWE1ZDAtNGMxMC05NWQ0LTdhNzU5NTNkODlhMCIsImFsbG93ZWQtb3JpZ2lucyI6WyIqIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJ1bWFfYXV0aG9yaXphdGlvbiIsImFwaXVzZXIiXX0sInJlc291cmNlX2FjY2VzcyI6eyJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50Iiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXIrMUBlMmVuZXR3b3Jrcy5jb20iLCJnaXZlbl9uYW1lIjoiQXdhZGhlc2giLCJmYW1pbHlfbmFtZSI6Ikt1bWFyIiwiZW1haWwiOiJhd2FkaGVzaC5rdW1hcisxQGUyZW5ldHdvcmtzLmNvbSJ9.Hp9VED8hYAbF9XbNQn_WyhCHUim2ui5jNdSRG_lP9B_7gU1YXLsHotupJr3iEJb7FC1XbeoKobwv9PpPJOtyiNUvEPWBza5ir_U737ujdD-NYSzUX-412sTqktjdKqcR78XfpmCIDE-5MeHf5cC3atSvP20XGh4T7d1CeL3oSRE'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

NODEJS

NodeJs Request Example

      var request = require("request");

var options = { method: 'GET',
  url: 'https://api.e2enetworks.com/myaccount/api/v1/images/upgradeimage/4165/',
  qs: { apikey: '9b6f7cbb-d574-4c3c-9312-5756e2a4e610'},
  headers:
   {  'content-type': 'application/json',
     authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJGSjg2R2NGM2pUYk5MT2NvNE52WmtVQ0lVbWZZQ3FvcXRPUWVNZmJoTmxFIn0.eyJqdGkiOiI4MjUwZTEyZS02MDJmLTQ0MzItODI1Ni01OGM3MmE4ODZkYjciLCJleHAiOjE1ODcxOTM2NjYsIm5iZiI6MCwiaWF0IjoxNTU1NjU3NjY2LCJpc3MiOiJodHRwOi8vMTcyLjE2LjIxNS45NTo4MDgwL2F1dGgvcmVhbG1zL2FwaW1hbiIsImF1ZCI6ImFwaW1hbiIsInN1YiI6IjMxOWU1ZGExLTZmYzItNDY2ZS1iNDI4LTRmOTViOTRlNDMzMCIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFwaW1hbiIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6ImFlYTQzYzMzLWU4YzMtNDRkNC1iYTc1LTEyODdjYzhhY2E4OCIsImFjciI6IjEiLCJjbGllbnRfc2Vzc2lvbiI6ImQ3NmM2OGI3LTQyMDAtNDQyZi04MDkwLTk1OGRjNjljZGQ2OCIsImFsbG93ZWQtb3JpZ2lucyI6WyIqIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJ1bWFfYXV0aG9yaXphdGlvbiIsImFwaXVzZXIiXX0sInJlc291cmNlX2FjY2VzcyI6eyJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50Iiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkF3YWRoZXNoIEt1bWFyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYXdhZGhlc2gua3VtYXIrMUBlMmVuZXR3b3Jrcy5jb20iLCJnaXZlbl9uYW1lIjoiQXdhZGhlc2giLCJmYW1pbHlfbmFtZSI6Ikt1bWFyIiwiZW1haWwiOiJhd2FkaGVzaC5rdW1hcisxQGUyZW5ldHdvcmtzLmNvbSJ9.OYExaJ_6tGDeT6MyT8jBWkvn2zVXM8PVpuukMGVd4oxpGv2kHBWKQqNIyA4XUNLOoup36V02UyLJhvi8MMGKX2-FF9m05o1-TgYHl51Ale9JNPRbLUWA5uanoyjOo29Fv3XyEx2c-PMaZ5rTFt730ISPkSAt4GLx-zWHGW-kJc4' },
  };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Headers

Request Headers

Content-Type: application/json
Authorization: Bearer b7d03a6947b217efb6f3ec3bd3504582

Response Headers

content-type: application/json; charset=utf-8
status: 200 OK
ratelimit-limit: 1200
ratelimit-remaining: 777
ratelimit-reset: 1415984218

Body

Response Body

{"message":"Success",
                "code":200,
                "data":[{"name":"C2.15GB-Debian9",
                "plan":"C-6vCPU-15RAM-150DISK-C2.15GB-Debian9",
                "image":"Debian-9-Distro",
                "os":{"name":"Debian",
                                "version":"9","image":
                                "Debian-9-Distro",
                                "category":"Debian"
                        },
                "zone":{"slug_name":"ncr"},
                "specs":{"sku_name":"C2.15GB",
                                "ram":"15.00",
                                "cpu":6,
                                "disk_space":150,
                                "price_per_month":"2555.00",
                                "price_per_hour":"3.50",
                                "series":"C","minimum_billing_amount":"0",
                                "committed_sku":[],
                                "family":"CPU Intensive"
                },
                "cpu_type":"vCPU",
                "gpu_card_details":{},
                "node_description":"",
                "installed_application_version":{}
              },
],
"Errors":{}}