curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/nodes/action-on-multiple-nodes/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "node_ids": [ 12345 ], "type": "power_off"}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/nodes/action-on-multiple-nodes/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "node_ids": [ 12345, ], "type": "power_off", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/nodes/action-on-multiple-nodes/");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({ "node_ids": [ 12345 ], "type": "power_off" }),});console.log(await response.json());Applies the same action to up to 10 nodes at once; a longer node_ids list is rejected with “Batch actions can be performed on maximum 10 nodes at a time.” The body is a JSON payload with a node_ids array and a type field naming the action. Only power_off, power_on, reboot, lock_vm, and unlock_vm are supported for a batch; any other action is rejected. This view reads the request body directly rather than through a schema class, so the required fields here are written from the view’s own code, not from an automated schema check.
Parameters
Section titled “Parameters”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 bulk action request
Example
<API_KEY>Region of the target nodes
Example
<LOCATION>Request Body
Section titled “Request Body”object
IDs of the nodes to apply the action to. All nodes must belong to the project identified by the project_id query parameter and must be in a state compatible with the chosen action (e.g. you cannot power_off a node that is already off).
The bulk-supported action to perform. A strict subset of the single-node action set - only the “simple” actions that take no additional fields are allowed in bulk.
Example
power_offResponses
Section titled “Responses”Successful response
object
HTTP status code of the bulk action result.
Result data returned by the bulk action.
object
Human-readable status message for the bulk action.
Example
{ "code": 200, "data": "", "message": "All selected nodes powered off successfuly."}