curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/actions/?project_id=<PROJECT_ID>&location=<LOCATION>&action=<ACTION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "reserved_ip_id": 49}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/actions/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "action": "<ACTION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "reserved_ip_id": 49, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/{Instance_id}/actions/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", action: "<ACTION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "reserved_ip_id": 49 }),});console.log(await response.json());Perform lifecycle actions on an Instance or Virtual Machine using the action query parameter.
For Virtual Machines, use action=start, action=stop, or action=restart. The value is not case sensitive. Startup scripts run automatically on every boot. A VM on a committed plan cannot be started or stopped. These requests are refused when the VM is in the wrong state: “Notebook is already started”, “Notebook is already stopped”, “Restart action not allowed when notebook is stopped.”, and, while the VM is saving an image, “Save Image operation is currently in progress. Please wait for it to complete.”
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 Body
Section titled “Request Body”object
ID of the reserved IP. Send it only with attach_reserve_ip.
Example
49Responses
Section titled “Responses”Notebook started or stopped successfully
object
object
object
Example
{ "code": 200, "message": "Notebook stopped/started successfully", "data": {}, "errors": {}}