curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/pvc/upgrade/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "size": 76}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/pvc/upgrade/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "size": 76, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/pvc/upgrade/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "size": 76 }),});console.log(await response.json());Increases the workspace disk size. Disk size can only be increased, not reduced. Works for both Instances and Virtual Machines.
For Virtual Machines: the disk can be resized while the VM is running. A resize does not restart the VM or run anything inside it, so the added space is not usable at once. To use it, restart the VM or extend the disk partition and file system inside the VM. The disk is at most 2000 GB, or less if the account has a smaller storage limit. Billing for the larger disk starts when the resize is accepted.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Instance ID
Query Parameters
Section titled “Query Parameters”Project ID
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Request Bodyrequired
Section titled “Request Bodyrequired”object
The new size in GB, a whole number above the current size. For a VM it is at most the account’s disk limit and never above 2000 GB; anything else is refused with “Disk Size should be an integer. It must be greater than the existing disk size and at most
Example
{ "size": 76}Responses
Section titled “Responses”Disk size upgraded successfully
object
object
object
object
object
object
object
object
object
Example
{ "code": 200, "message": "Disk Size upgraded successfully. It can take a few minutes for the changes to get reflected", "data": { "id": 5632, "name": "node-111316563232", "project_id": 124, "image_type": "pre-built", "image_details": { "image_id": 9, "version_id": 56, "name": "Transformers", "icon_url": "/notebook_images/hf-logo.png", "image_description": "Transformers v4.31.0 with Python 3.10 and NVIDIA Cuda 12.1 pre-installed on Ubuntu 22.04", "version_description": "Transformers v4.45.2 with Python 3.10 and NVIDIA Cuda 12.4 pre-installed on Ubuntu 22.04" }, "sku_details": { "specs": { "sku_id": 4, "name": "C3.8GB", "series": "CPU", "cpu": 4, "gpu": 0, "memory": 8, "is_free": false, "is_active": true, "gpu_switch_type": null, "local_storage_in_gb": 0 }, "plan": { "sku_item_price_id": 4, "sku_type": "hourly", "committed_days": 0, "unit_price": 3.1, "currency": "INR", "is_active": true, "description": null } }, "status": "ready", "last_activity": "2024-11-13T11:27:27Z", "created_by": { "id": 3573, "name": "Nipun", "email": "nipun.arora@e2enetworks.com", "username": "nipun.arora@e2enetworks.com" }, "created_at": "2024-11-13T11:27:27.186708Z", "updated_at": "2024-11-13T11:42:32.188962Z", "lab_url": "https://notebooks.e2enetworks.com/notebook/p-124/n-3cadd904-9532-4f91-a865-85e8b1509699/lab", "disk_size_in_gb": 31, "instance_type": "paid_usage", "ssh_keys": [], "disable_ssh_login_password": true, "public_ip": "", "e2e_registry_image_url": null, "egress_gateway_ip": "116.204.174.139", "add_ons": {}, "is_jupyterlab_enabled": true, "is_ssh_enabled": false, "custom_ports": [], "private_cloud_id": null, "custom_sku": null }, "errors": {}}The size is not a whole number above the current size, or is above the disk limit
object
Example
{ "code": 400, "message": "Error", "errors": "Disk Size should be an integer. It must be greater than the existing disk size and at most 2000GB"}