Skip to content

Bulk Action

PUT
/api/v1/nodes/action-on-multiple-nodes/
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"
}'

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.

project_id
required
integer

Identifier of the project to scope the request to. Required integer project ID.

Example

<PROJECT_ID>
apikey
required
string

API key used to authenticate the bulk action request

Example

<API_KEY>
location
required
string

Region of the target nodes

Example

<LOCATION>
Media typeapplication/json
object
node_ids
required

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).

Array<integer>
type
required

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.

string
Allowed values: power_off power_on reboot lock_vm unlock_vm

Example

power_off

Successful response

Media typeapplication/json
object
code

HTTP status code of the bulk action result.

integer
data

Result data returned by the bulk action.

string
errors
object
message

Human-readable status message for the bulk action.

string

Example

{
"code": 200,
"data": "",
"message": "All selected nodes powered off successfuly."
}