curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/nodes/upgrade/{node_id}?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "plan": "C3-2vCPU-2RAM-15DISK-C3.4GB_CHENNAI-Chennai", "image": "CentOS-7.5-Distro"}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/nodes/upgrade/{node_id}", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "plan": "C3-2vCPU-2RAM-15DISK-C3.4GB_CHENNAI-Chennai", "image": "CentOS-7.5-Distro", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/nodes/upgrade/{node_id}");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "plan": "C3-2vCPU-2RAM-15DISK-C3.4GB_CHENNAI-Chennai", "image": "CentOS-7.5-Distro" }),});console.log(await response.json());Upgrades the node to a larger plan (more vCPU / RAM / disk). The node must be powered off before issuing this request. The upgrade is destructive to the underlying VM but preserves the persistent root disk; transient state in RAM is lost.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Path parameter node_id.
Query Parameters
Section titled “Query Parameters”Identifier of the project to scope the request to. Required integer project ID.
Example
<PROJECT_ID>API key used to authenticate the request
Example
<API_KEY>Region of the node being upgraded.
Example
<LOCATION>Request Body
Section titled “Request Body”object
Plan SKU to upgrade to. The new plan must be larger than the current plan in at least one dimension (vCPU / RAM / disk). Use the plans API to discover valid SKUs.
Example
C3-2vCPU-2RAM-15DISK-C3.4GB_CHENNAI-ChennaiOS image identifier to use after the upgrade. Usually the same as the node’s current image - supplied explicitly so the new VM is reprovisioned from a known template.
Example
CentOS-7.5-DistroResponses
Section titled “Responses”Successful response
object
HTTP status code indicating the result of the upgrade request.
object
Number of virtual CPUs in the upgraded plan.
RAM allocation in megabytes.
Root disk size in megabytes.
Identifier of the customer that owns the node.
Identifier of the virtual machine.
Identifier of the post-upgrade node image.
Identifier of the pre-upgrade node image.
Action identifier returned in the upgrade response.
Identifier of the target cluster. May be null when the node is not pinned to a specific cluster.
Size value returned by the upgrade response.
Region/city name where the upgraded node lives.
object
Human-readable status message for the upgrade.
Example
{ "code": 200, "data": { "vcpu": 8, "ram": 16000, "disk-size": 143051, "customer_id": 12345, "vm_id": 12345, "new_node_image_id": 12345, "old_node_image_id": 12345, "action": "Delhi", "size": 0, "location": "Delhi" }, "message": "Node successfully upgraded"}