Apply a schedule to every location in a cluster
curl --request POST \
--url https://api.ridergy.com/v1/clusters/{clusterId}/schedules \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"startTime": "2026-06-12T08:00:00Z",
"endTime": "2026-06-12T18:00:00Z",
"limitKw": 50,
"priority": 5
}
'import requests
url = "https://api.ridergy.com/v1/clusters/{clusterId}/schedules"
payload = {
"startTime": "2026-06-12T08:00:00Z",
"endTime": "2026-06-12T18:00:00Z",
"limitKw": 50,
"priority": 5
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startTime: '2026-06-12T08:00:00Z',
endTime: '2026-06-12T18:00:00Z',
limitKw: 50,
priority: 5
})
};
fetch('https://api.ridergy.com/v1/clusters/{clusterId}/schedules', 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.ridergy.com/v1/clusters/{clusterId}/schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startTime' => '2026-06-12T08:00:00Z',
'endTime' => '2026-06-12T18:00:00Z',
'limitKw' => 50,
'priority' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.ridergy.com/v1/clusters/{clusterId}/schedules"
payload := strings.NewReader("{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://api.ridergy.com/v1/clusters/{clusterId}/schedules")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ridergy.com/v1/clusters/{clusterId}/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}"
response = http.request(request)
puts response.read_body{
"clusterId": "clst_20260612_a1b2c3d4",
"applied": [
{
"locationId": "3632155",
"priority": 5,
"limitKw": 50,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"permanentLimitKw": 100,
"effectiveLimitKw": 50
}
],
"errors": [
{
"locationId": "<string>",
"error": {
"error": {
"code": "LOCATION_NOT_FOUND",
"message": "Location 123 was not found for the provided tenant",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"totalLocations": 2
}集群
将计划应用于集群中的所有位置
将同一个 LimitProfileRequest 应用到该集群中的每个位置
(等效于对每个成员分别调用
POST /locations/{locationId}/schedules)。
POST
/
clusters
/
{clusterId}
/
schedules
Apply a schedule to every location in a cluster
curl --request POST \
--url https://api.ridergy.com/v1/clusters/{clusterId}/schedules \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"startTime": "2026-06-12T08:00:00Z",
"endTime": "2026-06-12T18:00:00Z",
"limitKw": 50,
"priority": 5
}
'import requests
url = "https://api.ridergy.com/v1/clusters/{clusterId}/schedules"
payload = {
"startTime": "2026-06-12T08:00:00Z",
"endTime": "2026-06-12T18:00:00Z",
"limitKw": 50,
"priority": 5
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startTime: '2026-06-12T08:00:00Z',
endTime: '2026-06-12T18:00:00Z',
limitKw: 50,
priority: 5
})
};
fetch('https://api.ridergy.com/v1/clusters/{clusterId}/schedules', 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.ridergy.com/v1/clusters/{clusterId}/schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startTime' => '2026-06-12T08:00:00Z',
'endTime' => '2026-06-12T18:00:00Z',
'limitKw' => 50,
'priority' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.ridergy.com/v1/clusters/{clusterId}/schedules"
payload := strings.NewReader("{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://api.ridergy.com/v1/clusters/{clusterId}/schedules")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ridergy.com/v1/clusters/{clusterId}/schedules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startTime\": \"2026-06-12T08:00:00Z\",\n \"endTime\": \"2026-06-12T18:00:00Z\",\n \"limitKw\": 50,\n \"priority\": 5\n}"
response = http.request(request)
puts response.read_body{
"clusterId": "clst_20260612_a1b2c3d4",
"applied": [
{
"locationId": "3632155",
"priority": 5,
"limitKw": 50,
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"permanentLimitKw": 100,
"effectiveLimitKw": 50
}
],
"errors": [
{
"locationId": "<string>",
"error": {
"error": {
"code": "LOCATION_NOT_FOUND",
"message": "Location 123 was not found for the provided tenant",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"totalLocations": 2
}授权
按租户分配的 API 密钥。租户信息从密钥中获取——绝不来自请求本身。
路径参数
请求体
application/json
ISO-8601 UTC 时间戳。必填。
示例:
"2026-06-12T08:00:00Z"
ISO-8601 UTC 时间戳。必须晚于 startTime 且为未来时间。必填。
示例:
"2026-06-12T18:00:00Z"
功率限制,单位为 kW。必须大于 0。必填。
示例:
50
OCPP 协议栈风格的优先级级别,0(最低)到 10(最高)。 如果该目标对象在此优先级下已存在配置文件,再次提交将 替换该配置文件。
必填范围:
0 <= x <= 10示例:
5
⌘I

