This endpoint submits monthly generation data for a grouped device.
此接口用于提交分组设备每月的发电数据。
Table of Contents
Table of Contents | ||
---|---|---|
|
Changelogs
Version | Date | Changes by | Description of change |
V1.0.1 |
| Que Nguyen |
|
V1.0.2 |
| Que Nguyen |
|
The Monthly Generation Data resource
RemoteInvId (required) - text Remote Inverter Id |
---|
Data (required) - object (Yearly Generation Data Resource) Generation data by Year |
Code Block | ||
---|---|---|
| ||
{ "RemoteInvId": "RM10000203212003543386274014-INV02", "Data": { "Year": 2023, "PeriodProductionPerMonthInKWh": { "Jan": 321.111, "Feb": 211.222, "Mar": 211.333, "Apr": 221.444, "May": 311.555, "Jun": 211.666, "Jul": 189.777, "Aug": 221.888, "Sep": 231.999, "Oct": 311.109, "Nov": 321.111, "Dec": 171.121 } } } |
The Yearly Generation Data Resource
Year (required) - number The time to capture data in the format 'YYYY' |
---|
PeriodProductionPerMonthInKWh (required) - object (Monthly Period Production in kWh) Generation by Month |
Code Block | ||
---|---|---|
| ||
{ "Year": 2023, "PeriodProductionPerMonthInKWh": { "Jan": 321.111, "Feb": 211.222, "Mar": 211.333, "Apr": 221.444, "May": 311.555, "Jun": 211.666, "Jul": 189.777, "Aug": 221.888, "Sep": 231.999, "Oct": 311.109, "Nov": 321.111, "Dec": 171.121 } } |
The Monthly Period Production in kWh resource
Jan (nullable) - number Energy generation in January |
---|
Feb (nullable) - number Energy generation in February |
Mar (nullable) - number Energy generation in March |
Apr (nullable ) - number Energy generation in April |
May (nullable) - number Energy generation in May |
Jun (nullable) - number Energy generation in June |
July (nullable) - number Energy generation in July |
Aug (nullable) - number Energy generation in August |
Sep (nullable) - number Energy generation in September |
Oct (nullable) - number Energy generation in October |
Nov (nullable) - number Energy generation in November |
Dec (nullable) - number Energy generation in December |
Code Block | ||
---|---|---|
| ||
{ "Jan": 321.111, "Feb": 211.222, "Mar": 211.333, "Apr": 221.444, "May": 311.555, "Jun": 211.666, "Jul": 189.777, "Aug": 221.888, "Sep": 231.999, "Oct": 311.109, "Nov": 321.111, "Dec": 171.121 } |
API Definition
Status | ||||
---|---|---|---|---|
|
/public/v2/generation-datas/monthly-data
Request Header
Content-Type |
|
Request Payload
Array object - Array of Month Generation Data Resource above
Total maximum of monthly data will 250 records. Counting all Data.PeriodProductionPerMonthInKWh
每次发的最大月份记录数为250个。
RemoteInvId (required) - text Remote Inverter Id |
---|
Data (required) - object (Yearly Generation Data Resource) Generation data by Year |
Data.Year (required) - number The time to capture data in the format 'YYYY' |
Data.PeriodProductionPerMonthInKWh (required) - object (Monthly Period Production in kWh) Generation by Month |
Data.PeriodProductionPerMonthInKWh.Jan (nullable) - number Energy generation in January |
Data.PeriodProductionPerMonthInKWh.Feb (nullable) - number Energy generation in February |
Data.PeriodProductionPerMonthInKWh.Mar (nullable) - number Energy generation in March |
Data.PeriodProductionPerMonthInKWh.Apr (nullable) - number Energy generation in April |
Data.PeriodProductionPerMonthInKWh.May (nullable) - number Energy generation in May |
Data.PeriodProductionPerMonthInKWh.Jun (nullable) - number Energy generation in June |
Data.PeriodProductionPerMonthInKWh.July (nullable) - number Energy generation in July |
Data.PeriodProductionPerMonthInKWh.Aug (nullable) - number Energy generation in August |
Data.PeriodProductionPerMonthInKWh.Sep (nullable) - number Energy generation in September |
Data.PeriodProductionPerMonthInKWh.Oct (nullable) - number Energy generation in October |
Data.PeriodProductionPerMonthInKWh.Nov (nullable) - number Energy generation in November |
Data.PeriodProductionPerMonthInKWh.Dec (nullable) - number Energy generation in December |
Example Request
Code Block |
---|
curl --location 'https://uat-api.redex.eco/public/v2/generation-datas/monthly-data' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjE0MjM5MTBGN0Y1Qjk5RTNCMzNGNTFGRTBEMkQwN0U1MzkzNDg3RTZSUzI1NiIsInR5cCI6ImF0K2p3dCIsImN0eSI6IkpXVCIsIng1dCI6IkZDT1JEMzlibWVPelAxSC1EUzBINVRrMGgtWSJ9.eyJuYmYiOjE3MTgzNTQyNjIsImV4cCI6MTcx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8LGMqo2EZk9RqCCX30esIz5aQz1NlZfT2m_K0penEHBe3gwm8daKKSjYCFXrKhAphxw8Wsv_DIPrTzAFnUjuqyJnJWGoYN919f7sV1Vp_nLoXtc1Mw' \ --header 'Content-Type: application/json' \ --data '[ { "RemoteInvId": "RM10000203212003543386274014-INV02", "Data": { "Year": 2023, "PeriodProductionPerMonthInKWh": { "Jan": 321.111, "Feb": 211.222, "Mar": 211.333, "Apr": 221.444, "May": 311.555, "Jun": 211.666, "Jul": 189.777, "Aug": 221.888, "Sep": 231.999, "Oct": 311.109, "Nov": 321.111, "Dec": 171.121 } } } ]' |
Response
Response Body |
Data:ProcessId - number Process Unique Identifier |
Errors list of error objects Please see "Getting Started - #Error Object" for more details 请查看Getting Started - #Error Object以获得更多信息。 |
Meta pagination resource Return Pagination Resource 返回分页信息 |
StatusCode integer Http Status codes standard. Example http状态码,如200,201,400, 422 |
Message text Response message: Success or error message. 返回成功或错误的信息。 |
Info |
---|
201 Created |
Code Block | ||
---|---|---|
| ||
{ "StatusCode": 201, "Errors": null, "Meta": null, "Data": { "ProcessId": 2024 }, "Message": "Send Power Data successfully" } |
Warning |
---|
400 Bad Request |
Code Block | ||
---|---|---|
| ||
{ "StatusCode": 400, "Errors": null, "Meta": null, "Data": null, "Message": "Request Validation failed." } |
Warning |
---|
422 Unprocessable Entity |
Code Block | ||
---|---|---|
| ||
{ "StatusCode": 422, "Errors": [ { "Key": "[0].RemoteInvId", "Message" : "Invalid Generation Data Frequency: Remote Inverter Id 'RMI321904392090' must send {Daily} generation data." "Messages": [ "Invalid Generation Data Frequency: Remote Inverter Id 'RMI321904392090' must send {Daily} generation data." ] } ], "Meta": null, "Data": null, "Message": "Request Validation failed: Unprocessable Entity" } |
Rate limit
Rate Limit Algorithm: Fixed Window
限流算法:固定窗口
In fixed window rate limiting, a fixed time window (e.g., one minute, one hour) is used to track the number of requests or actions allowed within that window. Requests exceeding the limit are either rejected or throttled until the window resets.
在固定窗口限流算法中,使用一个固定的时间窗口(例如,一分钟或一小时)来跟踪在该窗口(单位时间)内允许的请求或操作的次数。超过限制的请求将被拒绝或者受限,直到窗口重置。
Rate Limiting Overview
Our API employs rate limiting to ensure fair usage and protect the performance and availability of the service. Combination of Global Policy and Operation Policy
我们的API采用限流机制,旨在公平使用并保护服务的性能和可用性。采用全局策略和操作策略相结合的方式。我们的 API 采用限流机制,旨在公平使用并保护服务的性能和可用性。采用全局策略和操作策略相结合的方式。
Global Policy
Rate Limit: 3000 requests per 5 minute(s)
限流机制:每5分钟内可允许3000次请求限流机制:每 5 分钟内可允许 3000 次请求
Renewal Period: 300 second(s)
续订周期:300秒续订周期:300 秒
Key: IP Address
密钥:客户端IP地址密钥:客户端 IP 地址
Increment Condition: Any Request
增量条件:任何请求
Operation Policy
Rate Limit: 5 requests per 5 second(s)
限流机制:每5秒钟内可允许5次请求
Renewal Period: 5 second(s)
续订周期:5秒续订周期:5 秒
Key:
accound-id
business account Id.密钥:
accound-id
business account IdIncrement Condition: Any Request
增量条件:任何请求
Rate Limit Details
Rate Limit by Key: (根据密钥限流)
Key: This ensures that rate limits are applied uniquely for each business account id.(密钥:确保每个企业帐号ID都能够独立享有其唯一的限流策略。)(密钥:确保每个企业帐号 ID 都能够独立享有其唯一的限流策略。)
Request Limit: Each key is allowed to make up to 5 requests per 5 seconds.(请求限制:每个密钥允许在每5秒内最多进行5次请求。)(请求限制:每个密钥允许在每5秒内最多进行 5 次请求。)
Reset Interval: The limit resets every 5 seconds.(重置间隔:每隔5秒进行一次限流重置。)(重置间隔:每隔 5 秒进行一次限流重置。)
Response Headers:(响应头)
Retry-After: Sent when the rate limit is exceeded, indicating how long to wait before making another request.(Retry-After:当请求次数超过限流数量时发送该头部,提示需要等待多长时间才能再次发出请求,等待时间以秒为单位。)
Exceeding the Rate Limit
When the rate limit is exceeded, the API will return a 429 Too Many Requests
status code. The response will include a Retry-After
header specifying the number of seconds to wait before making a new request.
当请求次数超过限流数量时,API将返回状态码429 当请求次数超过限流数量时,API 将返回状态码 429 Too Many Requests。响应头中将包含一个RetryRequests。响应头中将包含一个 Retry-After,以提示需要等待多少秒后才能发出新请求。
Example Response When Rate Limit is Exceeded
Code Block | ||
---|---|---|
| ||
HTTP/1.1 429 Too Many Requests Retry-After: 60 Content-Type: application/json { "Data": null, "Errors": null, "StatusCode": 429, "Message": "Rate limit exceeded", "Meta": null } |