Get a location's permanent limit and all priority profiles
curl --request GET \
--url https://api.ridergy.com/v1/locations/{locationId}/limits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ridergy.com/v1/locations/{locationId}/limits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ridergy.com/v1/locations/{locationId}/limits', 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/locations/{locationId}/limits"
req, _ := http.NewRequest("GET", 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/locations/{locationId}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.get("https://api.ridergy.com/v1/locations/{locationId}/limits")
.header("Authorization", "Bearer <token>")
.asString();{
"locationId": "3632155",
"permanentLimitKw": 100,
"effectiveLimitKw": 50,
"currentKw": 42.3,
"maxKw": 150,
"profiles": [
{
"priority": 5,
"limitKw": 50,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"status": "SCHEDULED"
}
]
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired token",
"requestId": "b1f6e6b0-1234-4abc-9def-000000000000"
}
}{
"error": {
"code": "FEATURE_NOT_ENABLED",
"message": "The Energy Management API is not enabled for your account. Contact RiDERgy to enable this feature.",
"requestId": "b1f6e6b0-1234-4abc-9def-000000000000"
}
}{
"error": {
"code": "LOCATION_NOT_FOUND",
"message": "Location 123 was not found for the provided tenant",
"requestId": "b1f6e6b0-1234-4abc-9def-000000000000"
}
}Ubicaciones
Obtener el límite permanente y todos los perfiles prioritarios de una ubicación
Devuelve el límite de reserva permanente de la ubicación, el límite
efectivo actual, el consumo de potencia actual en vivo (currentKw),
la capacidad máxima nominal (maxKw, si se conoce) y todos los
perfiles de prioridad (incluidos los expirados y los programados) con
un status recalculado.
GET
/
locations
/
{locationId}
/
limits
Get a location's permanent limit and all priority profiles
curl --request GET \
--url https://api.ridergy.com/v1/locations/{locationId}/limits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ridergy.com/v1/locations/{locationId}/limits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ridergy.com/v1/locations/{locationId}/limits', 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/locations/{locationId}/limits"
req, _ := http.NewRequest("GET", 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/locations/{locationId}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.get("https://api.ridergy.com/v1/locations/{locationId}/limits")
.header("Authorization", "Bearer <token>")
.asString();{
"locationId": "3632155",
"permanentLimitKw": 100,
"effectiveLimitKw": 50,
"currentKw": 42.3,
"maxKw": 150,
"profiles": [
{
"priority": 5,
"limitKw": 50,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"status": "SCHEDULED"
}
]
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired token",
"requestId": "b1f6e6b0-1234-4abc-9def-000000000000"
}
}{
"error": {
"code": "FEATURE_NOT_ENABLED",
"message": "The Energy Management API is not enabled for your account. Contact RiDERgy to enable this feature.",
"requestId": "b1f6e6b0-1234-4abc-9def-000000000000"
}
}{
"error": {
"code": "LOCATION_NOT_FOUND",
"message": "Location 123 was not found for the provided tenant",
"requestId": "b1f6e6b0-1234-4abc-9def-000000000000"
}
}Autorizaciones
Respuesta
Límites de la ubicación

