Remove a location from a cluster
curl --request DELETE \
--url https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.delete("https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}")
.header("Authorization", "Bearer <token>")
.asString();{
"clusterId": "clst_20260612_a1b2c3d4",
"tenantUuid": "<string>",
"name": "North Campus",
"locationIds": [
"3632155",
"3632156"
],
"limitKw": 200,
"status": "ACTIVE",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
Clusters
Remover um local de um cluster
Remove um local da lista locationIds de um cluster. É uma
alternativa atômica a PATCH /clusters/{clusterId} com um array
locationIds reduzido, para que remoções concorrentes não possam
competir entre si.
Um cluster deve sempre ter pelo menos um local membro. Remover o
último falha com 400 CLUSTER_EMPTY. Nesse caso, exclua o cluster com
DELETE /clusters/{clusterId}.
DELETE
/
clusters
/
{clusterId}
/
locations
/
{locationId}
Remove a location from a cluster
curl --request DELETE \
--url https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.delete("https://api.ridergy.com/v1/clusters/{clusterId}/locations/{locationId}")
.header("Authorization", "Bearer <token>")
.asString();{
"clusterId": "clst_20260612_a1b2c3d4",
"tenantUuid": "<string>",
"name": "North Campus",
"locationIds": [
"3632155",
"3632156"
],
"limitKw": 200,
"status": "ACTIVE",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
Autorizações
Token de acesso OAuth 2.0 obtido via POST /oauth/token com grant client_credentials.
O tenant e os escopos estão incorporados no JWT. Nenhum cabeçalho adicional é necessário.
Parâmetros de caminho
O identificador único do cluster, devolvido quando o cluster foi criado.
O identificador único da localização.
Resposta
Local removido, cluster atualizado retornado

