Skip to main content
PUT
/
clusters
/
{cluster_id}
Update Cluster
curl --request PUT \
  --url https://api.xplenty.com/{account_id}/api/clusters/{cluster_id} \
  --header 'Accept: <accept>' \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "nodes": 123,
  "terminate_on_idle": true,
  "time_to_idle": 123
}
'
import requests

url = "https://api.xplenty.com/{account_id}/api/clusters/{cluster_id}"

payload = {
"name": "<string>",
"description": "<string>",
"nodes": 123,
"terminate_on_idle": True,
"time_to_idle": 123
}
headers = {
"Accept": "<accept>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {
Accept: '<accept>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
nodes: 123,
terminate_on_idle: true,
time_to_idle: 123
})
};

fetch('https://api.xplenty.com/{account_id}/api/clusters/{cluster_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.xplenty.com/{account_id}/api/clusters/{cluster_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'nodes' => 123,
'terminate_on_idle' => true,
'time_to_idle' => 123
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.xplenty.com/{account_id}/api/clusters/{cluster_id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"nodes\": 123,\n \"terminate_on_idle\": true,\n \"time_to_idle\": 123\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.xplenty.com/{account_id}/api/clusters/{cluster_id}")
.header("Accept", "<accept>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"nodes\": 123,\n \"terminate_on_idle\": true,\n \"time_to_idle\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.xplenty.com/{account_id}/api/clusters/{cluster_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"nodes\": 123,\n \"terminate_on_idle\": true,\n \"time_to_idle\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "id": 99,
  "name": "Daily Outliers Test #100",
  "description": "Daily Outliers Test",
  "status": "available",
  "owner_id": 27,
  "plan_id": 123,
  "nodes": 2,
  "type": "production",
  "created_at": "2013-01-25T08:18:39Z",
  "updated_at": "2013-01-28T16:45:24Z",
  "available_since": "2023-11-07T05:31:56Z",
  "terminated_at": "2023-11-07T05:31:56Z",
  "running_jobs_count": 0,
  "terminate_on_idle": false,
  "time_to_idle": 3600,
  "terminated_on_idle": false,
  "region": "amazon-web-services::us-east-1",
  "zone": "us-east-1b",
  "master_instance_type": "m3.xlarge",
  "slave_instance_type": "m3.xlarge",
  "master_spot_price": 123,
  "slave_spot_price": 123,
  "master_spot_percentage": 123,
  "slave_spot_percentage": 123,
  "allow_fallback": true,
  "stack": "white-everest",
  "idle_since": "2023-11-07T05:31:56Z",
  "url": "https://api.xplenty.com/xplenation/api/clusters/99",
  "html_url": "https://xplenty.com/xplenation/clusters/99",
  "creator": {
    "type": "<string>",
    "display_name": "<string>",
    "id": 123,
    "url": "<string>"
  }
}
{
"message": "Item not found."
}
{
"message": "Item not found."
}
{
"message": "Item not found."
}

Authorizations

Authorization
string
header
required

Enter your API key as the username. Leave the password field blank. Example: curl -u YOUR_API_KEY: https://api.xplenty.com/...

Headers

Accept
string
default:application/vnd.xplenty+json; version=2
required

API version header — required on all requests

Path Parameters

cluster_id
integer
required

The unique ID of the cluster

Body

application/json
name
string
description
string
nodes
integer
terminate_on_idle
boolean
time_to_idle
integer

Response

Cluster updated

id
integer
Example:

99

name
string
Example:

"Daily Outliers Test #100"

description
string
Example:

"Daily Outliers Test"

status
enum<string>
Available options:
pending,
creating,
available,
scaling,
pending_terminate,
terminating,
terminated,
error
Example:

"available"

owner_id
integer
Example:

27

plan_id
integer | null
nodes
integer
Example:

2

type
enum<string>
Available options:
sandbox,
production
Example:

"production"

created_at
string<date-time>
Example:

"2013-01-25T08:18:39Z"

updated_at
string<date-time>
Example:

"2013-01-28T16:45:24Z"

available_since
string<date-time> | null
terminated_at
string<date-time> | null
running_jobs_count
integer
Example:

0

terminate_on_idle
boolean
Example:

false

time_to_idle
integer

Seconds of inactivity before auto-termination

Example:

3600

terminated_on_idle
boolean
Example:

false

region
string
Example:

"amazon-web-services::us-east-1"

zone
string
Example:

"us-east-1b"

master_instance_type
string
Example:

"m3.xlarge"

slave_instance_type
string
Example:

"m3.xlarge"

master_spot_price
number | null
slave_spot_price
number | null
master_spot_percentage
number | null
slave_spot_percentage
number | null
allow_fallback
boolean
Example:

true

stack
string
Example:

"white-everest"

idle_since
string<date-time> | null
url
string<uri>
Example:

"https://api.xplenty.com/xplenation/api/clusters/99"

html_url
string<uri>
Example:

"https://xplenty.com/xplenation/clusters/99"

creator
object
Last modified on June 9, 2026