跳转到主要内容
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
}
'
{
  "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
}

授权

x-api-key
string
header
必填

按租户分配的 API 密钥。租户信息从密钥中获取——绝不来自请求本身。

路径参数

clusterId
string
必填

请求体

application/json
startTime
string<date-time>
必填

ISO-8601 UTC 时间戳。必填。

示例:

"2026-06-12T08:00:00Z"

endTime
string<date-time>
必填

ISO-8601 UTC 时间戳。必须晚于 startTime 且为未来时间。必填。

示例:

"2026-06-12T18:00:00Z"

limitKw
number<float>
必填

功率限制,单位为 kW。必须大于 0。必填。

示例:

50

priority
integer
默认值:0

OCPP 协议栈风格的优先级级别,0(最低)到 10(最高)。 如果该目标对象在此优先级下已存在配置文件,再次提交将 替换该配置文件。

必填范围: 0 <= x <= 10
示例:

5

响应

调度计划已应用到至少一个位置

clusterId
string
示例:

"clst_20260612_a1b2c3d4"

applied
object[]
errors
object[]
totalLocations
integer
示例:

2