Skip to main content
DELETE
/
clusters
/
{cluster_id}
Terminate Cluster
curl --request DELETE \
  --url https://api.xplenty.com/{account_id}/api/clusters/{cluster_id} \
  --header 'Accept: <accept>' \
  --header 'Authorization: Basic <encoded-value>'
import requests

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

headers = {
"Accept": "<accept>",
"Authorization": "Basic <encoded-value>"
}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {
method: 'DELETE',
headers: {Accept: '<accept>', Authorization: 'Basic <encoded-value>'}
};

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 => "DELETE",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Basic <encoded-value>"
],
]);

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

curl_close($curl);

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

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

func main() {

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

req, _ := http.NewRequest("DELETE", url, nil)

req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "Basic <encoded-value>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://api.xplenty.com/{account_id}/api/clusters/{cluster_id}")
.header("Accept", "<accept>")
.header("Authorization", "Basic <encoded-value>")
.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::Delete.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = 'Basic <encoded-value>'

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."
}

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

Response

Cluster termination initiated

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