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"
}
Cluster
Rimuovi una location da un cluster
Rimuove una location dall’elenco locationIds di un cluster. È
un’alternativa atomica a PATCH /clusters/{clusterId} con un array
locationIds più corto, così rimozioni concorrenti non possono
entrare in conflitto tra loro.
Un cluster deve avere sempre almeno una location membro. Rimuovere
l’ultima fallisce con 400 CLUSTER_EMPTY. In quel caso, elimina il
cluster con 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"
}
Autorizzazioni
Access token OAuth 2.0 ottenuto tramite POST /oauth/token con grant client_credentials.
Tenant e scopes sono incorporati nel JWT. Non sono necessari header aggiuntivi.
Parametri del percorso
L'identificativo univoco del cluster, restituito alla sua creazione.
L'identificativo univoco della sede.
Risposta
Location rimossa, cluster aggiornato restituito

