[GET] Query Generation Data
This endpoint gets daily/monthly generation data.
此端点获取每日/每月发电数据
Table of Contents
Changelogs
Version | Date | Changes by | Description of change |
V1.0 | Mar 29, 2024 | Que Nguyen |
|
V1.0.1 | April 5, 2024 | Que Nguyen |
|
V1.0.2 | April 10, 2024 | Que Nguyen |
|
V1.0.4 | April 22, 2024 | Que Nguyen |
|
V1.0.5 | May 10, 2024 | Que Nguyen |
|
V1.0.6 | May 30, 2024 | Que Nguyen |
|
Release status
Environment | Status | Released Date | Version |
DEV | Released | May 30, 2024 | V1.0.6 |
UAT | Released | Apr 10, 2024 | V1.0.5 |
PROD | RELEASED | May 15, 2024 | V1.0.5 |
API Definition
Resource information |
| |
---|---|---|
Response format(s) | JSON |
|
Requires authentication? | Yes using token |
|
Request Header | ||
Name | value | |
|
|
|
|
|
|
Parameters |
| |
|
| The type of frequency (i.e., Daily, Weekly, Monthly) for data retrieval For Inverter level, only support Daily Frequency 数据检索的频率类型(例如,每日、每周、每月) 目前只支持Daily |
|
| This refers to a unique identifier assigned to inverter ex: UNIQ8888888 这指的是分配给设备的唯一标识符。如果不传的话,将把当前账号下所有的逆变器发电数据查出来。 例如:UNIQ8888888 |
|
| The start date for data retrieval in the format 'YYYY-MM-DD' Notes: Constrain between From 数据检索的开始日期,格式为 'YYYY-MM-DD' 开始到结束时间最多允许查询三个月 |
|
| The end date for data retrieval in the format 'YYYY-MM-DD' 数据检索的结束日期,格式为 'YYYY-MM-DD' 开始到结束时间最多允许查询三个月 |
|
| Request field for pagination. The Page that you wish to view 用于分页的请求字段 |
|
| The total items that return in the response 分页的每页数据数 |
Returns | ||
Return generation data daily/monthly in a range of time. |
Response Header | ||
---|---|---|
|
| |
Response Body | ||
Field | Type | Description | 描述 |
|
| Code ex: 401 代码 例如:401 |
|
| Result message ex: The token is invalid 结果消息 例如:令牌无效 |
|
| Array Data object. {
"CollectTime": 1677628800000,
"CollectTimeFmt": "2023-03-01",
"ProductPower": 5.7,
"AccumulatedEnergyInKWh": "10.1234",
"RemoteInvId": "UNIQ8888888",
"RemoteDevId": "DEVUNIQ42231888"
} |
|
| Collect time in Unix format ex: 1677628800000 Unix格式的收集时间 例如:1677628800000 |
|
| Collect time format in the format ' ex: 2023-03-01 收集时间的格式 ' 例如:2023-03-01 |
|
| Accumulated Energy generation ex: 100.1234 |
|
| Product power ex: 5.7 产品功率 例如:5.7 |
|
| Remote inverter Id |
Get /public/v2/generation-datas
Request
?RemoteInvId=UNIQ8888888&FrequencyType=Daily&FromDate=2023-03-01&ToDate=2023-06-01
Response
200 Success
{
"Data": [
{
"CollectTime": 1677628800000,
"CollectTimeFmt": "2023-03-01",
"ProductPower": 5.7,
"AccumulatedEnergyInKWh": "10.1234",
"RemoteInvId": "UNIQ8888888"
},
{
"CollectTime": 1677628800000,
"CollectTimeFmt": "2023-03-02",
"ProductPower": 5.7,
"AccumulatedEnergyInKWh": "15.8234",
"RemoteInvId": "UNIQ8888888"
}
],
"Meta": {
"CurrentPage": 1,
"TotalPage": 1,
"ItemsPerPage": 1,
"TotalItems": 1
},
"Errors": [],
"StatusCode": 200,
"Message": "Success"
}
400 Bad Request
422 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
Global Policy
Rate Limit: 3000 requests per 5 minute(s)
Renewal Period: 300 second(s)
Key: IP Address
Increment Condition: Any Request
Operation Policy
Rate Limit: 5 requests per 5 second(s)
Renewal Period: 5 second(s)
Key:
accound-id
business account Id.Increment Condition: Any Request
Rate Limit Details
Rate Limit by Key:
Key: This ensures that rate limits are applied uniquely for each business account id.
Request Limit: Each key is allowed to make up to 5 requests per 5 seconds.
Reset Interval: The limit resets every 5 seconds.
Response Headers:
Retry-After: Sent when the rate limit is exceeded, indicating how long to wait before making another request.
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.
Example Response When Rate Limit is Exceeded