Skip to content

Perform Node Action / Add SSH Key / Update Password

PUT
/api/v1/nodes/{node_id}/actions/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/nodes/{node_id}/actions/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"type": "power_off",
"name": "my-saved-image"
}'

Performs a lifecycle, security, or rename action on a single node. The action is selected by the type field in the request body. Some actions require additional fields (see the type description below for the per-action contract).

All actions return the same response envelope - data.action_type echoes the action that was performed. Long-running actions (reinstall, save_images) return status: "done" immediately to indicate the request was accepted; the node will transition through the actual workflow asynchronously.

Perform Node Action, Add SSH Key and Update Password share this request; the body you send decides which one runs.

node_id
required
string

Path parameter node_id.

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 request

Example

<API_KEY>
location
required
string

Region identifier for the target node

Example

<LOCATION>
Media typeapplication/json
One of:
object
type
required

Discriminator that selects which action to perform. Most actions require no additional fields; the two exceptions are save_images and rename, both of which require the name field below.

Supported values and their semantics:

  • power_off - gracefully shut down the node.

  • power_on - boot a powered-off node.

  • reboot - reboot the node (soft reboot via the guest OS where possible).

  • reinstall - wipe the node and reinstall the same OS image. Destructive: all data on the root disk is lost.

  • save_images - capture the current root disk as a saved image template. Requires name.

  • rename - change the node’s display name. Requires name.

  • enable_recovery_mode / disable_recovery_mode - toggle recovery-mode boot (mounts the root disk on a rescue image).

  • lock_vm / unlock_vm - administrative lock that blocks further actions until unlocked.

  • enable_accidental_protection / disable_accidental_protection - require an extra confirmation step before destructive actions.

  • enable_node_compliance / disable_node_compliance - toggle security-compliance mode (hardens the node per the platform’s compliance baseline).

string
Allowed values: power_off power_on reboot reinstall save_images rename enable_recovery_mode disable_recovery_mode lock_vm unlock_vm enable_accidental_protection disable_accidental_protection enable_node_compliance disable_node_compliance

Example

power_off
name

Required when type is save_images (sets the name of the saved image template) or rename (sets the new node display name). Ignored for all other action types.

string

Example

my-saved-image

Successful response

Media typeapplication/json
object
code

HTTP status code. 200 indicates the action was accepted.

integer
data
object
id

Unique identifier of the action record.

integer
created_at

ISO 8601 timestamp when the action was created.

string format: date-time
status

Action completion status. done indicates the request was accepted and synchronous work has finished. Long-running actions may also return pending.

string
Allowed values: done pending failed
action_type

Echo of the action that was performed. Usually matches the request’s type, but compound actions may report a related internal step - for example reinstall returns action_type: undeploy while the reinstall workflow runs.

string
resource_id

Numeric identifier of the affected node (as a string).

string
resource_name

Display name of the affected node.

string
image_id

Identifier of the saved image template. Only populated when action_type is save_images; empty string otherwise.

string
errors
object
message

Human-readable status message.

string

Example

{
"code": 200,
"data": {
"id": 123456,
"created_at": "2025-07-11T12:45:40.599874Z",
"status": "done",
"action_type": "power_off",
"resource_id": "12345",
"resource_name": "C3-8GB-784",
"image_id": ""
},
"message": "Success"
}