Skip to content

Cluster Actions

PUT
/distributed_jobs_v2/cluster/{Cluster_Id}/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/distributed_jobs_v2/cluster/{Cluster_Id}/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"action": "update_ssh_keys",
"ssh_key_ids": [
0
],
"image_version_id": 0,
"additional_nodes": 0,
"reserved_ip_id": 0,
"ip_type": "reserved",
"security_groups_ids": [
0
],
"security_group_id": 0
}'

Performs an action on a running Training Cluster. The action field in the request body determines the operation. Additional fields are required depending on the action:

Action Required Fields Description
update_ssh_keys ssh_key_ids Replace SSH keys on all cluster nodes
update_image image_version_id Update the container image on all cluster nodes
restart_workers — Restart all compute (worker) nodes without restarting the Slurm controller
restart_cluster — Restart the full cluster including the Slurm controller and all nodes
scale_cluster additional_nodes Add nodes to a running cluster without teardown or workload disruption
attach_ip reserved_ip_id Attach a reserved public IP to the cluster. Returns a Reserved IP object instead of a cluster object.
detach_ip reserved_ip_id, ip_type Detach a reserved public IP from the cluster. Returns an empty data object.
add_security_group security_groups_ids Attach one or more security groups to the cluster. Returns a success string.
remove_security_group security_group_id Remove a security group from the cluster. Returns a success string.
Cluster_Id
required
integer

Cluster ID

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
action
required

Action to perform on the cluster. Each action may require additional fields.

string
Allowed values: update_ssh_keys update_image restart_workers restart_cluster scale_cluster attach_ip detach_ip add_security_group remove_security_group
ssh_key_ids

Required for update_ssh_keys. List of SSH key IDs to attach to all cluster nodes.

Array<integer>
image_version_id

Required for update_image. ID of the image version to apply to all cluster nodes.

integer
additional_nodes

Required for scale_cluster. Number of nodes to add to the running cluster.

integer
reserved_ip_id

Required for attach_ip and detach_ip. ID of the reserved IP.

integer
ip_type

Required for detach_ip. Type of IP being detached.

string
Allowed values: reserved
security_groups_ids

Required for add_security_group. List of security group IDs to attach to the cluster.

Array<integer>
security_group_id

Required for remove_security_group. ID of the security group to remove from the cluster.

integer

Action performed successfully. Returns the updated cluster object.

Media typeapplication/json
object
code
integer
data
object
id
integer
name
string
created_by
object
id
integer
name
string
email
string
username
string
is_primary_contact
boolean
currency
string
is_suspended
boolean
no_of_nodes
integer
created_at
string format: date-time
private_cloud_id
integer
nullable
private_cloud_name
string
nullable
sku_details
object
specs
object
sku_id
integer
name
string
series
string
cpu
integer
gpu
integer
memory
integer
ephemeral_storage
integer
gpu_memory
integer
is_free
boolean
is_active
boolean
local_storage_in_gb
integer
sku_type
string
gpu_card_type
string
nullable
category
string
variant
string
no_of_nodes
integer
plan
object
sku_item_price_id
integer
sku_type
string
Allowed values: hourly committed
committed_days
integer
unit_price
number
currency
string
is_active
boolean
description
string
nullable
location
string
total_gpu
integer
total_cpu
integer
total_memory
string
available_gpu
integer
available_cpu
integer
available_memory
string
worker_nodes
Array<object>
object
has_local_storage
boolean
local_storage_per_node
integer
nullable
status
string
image_pull_policy
string
image_version
object
id
integer
version
string
description
string
tags
Array<string>
name
string
slug_name
string
framework
string
is_internal
boolean
ssh_keys
Array<object>
object
pk
integer
label
string
ssh_key
string
ssh_public_ip
string
has_floating_ip
boolean
reserve_ip
Array<object>
object
clone_data
object
name
string
sku_id
integer
project_id
integer
no_of_nodes
integer
ssh_key_ids
Array<integer>
script_added
boolean
pfs_mount_list
Array<object>
object
sfs_mount_list
Array<object>
object
id
integer
name
string
mount_path
string
image_version_id
integer
lifecycle_script
string
security_group_id
integer
sku_item_price_id
integer
dataset_mount_list
Array<object>
object
errors
object
message
string

Example

{
"code": 200,
"data": {
"id": 101,
"name": "training-cluster-010125103045",
"created_by": {
"id": 1001,
"name": "John Doe",
"email": "user@example.com",
"username": "user@example.com",
"is_primary_contact": true,
"currency": "INR",
"is_suspended": false
},
"no_of_nodes": 1,
"created_at": "2025-01-15T10:30:00Z",
"private_cloud_id": null,
"private_cloud_name": null,
"sku_details": {
"specs": {
"sku_id": 139,
"name": "C3.32GB",
"series": "CPU",
"cpu": 8,
"gpu": 0,
"memory": 32,
"ephemeral_storage": 0,
"gpu_memory": 0,
"is_free": false,
"is_active": true,
"local_storage_in_gb": 0,
"sku_type": "C3-250GB",
"gpu_card_type": null,
"category": "distributed_job",
"variant": "e2e",
"no_of_nodes": 1
},
"plan": {
"sku_item_price_id": 645,
"sku_type": "hourly",
"committed_days": 0,
"unit_price": 12.3,
"currency": "INR",
"is_active": true,
"description": null,
"location": "Delhi"
}
},
"total_gpu": 0,
"total_cpu": 0,
"total_memory": "0 GB",
"available_gpu": 0,
"available_cpu": 0,
"available_memory": "0 GB",
"worker_nodes": [],
"has_local_storage": false,
"local_storage_per_node": null,
"status": "Running",
"image_pull_policy": "IfNotPresent",
"image_version": {
"id": 2,
"version": "v2-slurm25.11-ubuntu24.04",
"description": "",
"tags": [],
"name": "Ubuntu Slurm",
"slug_name": "ubuntu-slurm",
"framework": "Slurm",
"is_internal": false
},
"ssh_keys": [
{
"pk": 1001,
"label": "my-ssh-key",
"ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB... user@example.com"
}
],
"ssh_public_ip": "203.0.113.10",
"has_floating_ip": true,
"reserve_ip": [],
"clone_data": {
"name": "training-cluster-010125103045",
"sku_id": 139,
"project_id": 10001,
"no_of_nodes": 1,
"ssh_key_ids": [
1001,
1002
],
"script_added": false,
"pfs_mount_list": [],
"sfs_mount_list": [],
"image_version_id": 2,
"lifecycle_script": "",
"security_group_id": 1001,
"sku_item_price_id": 645,
"dataset_mount_list": []
}
},
"errors": {},
"message": "Cluster updated successfully"
}