[POST] Send Generation Data for Grouped Device

This endpoint submits generation data for a grouped device.

此端点用于提交分组设备的单个逆变器的发电数据。

Table of Contents

Changelogs

Version

Date

Changes by

Description of change

V1.0

Mar 29, 2024

Que Nguyen

  • Added Table of Contents.

  • Added Changelogs.

V1.0.1

April 5, 2024

Que Nguyen

  • AccumulatedPowerInKWh renamed to AccumulatedEnergyInKWh

V1.0.2

April 8, 2024

Que Nguyen

  • Updated the document:

    • AccumulatedEnergyInKWh validation rule restricted to 3 decimal places

    • PeriodProductionInKWh validation rule restricted to 3 decimal places

V1.0.3

April 10, 2024

Que Nguyen

  • Added Release Status.

V1.0.4

May 13, 2024

Que Nguyen

  • Added Maximum generation data received: 3000 records

  • 一次性最大接受提交的电量记录数为3000,即一次性最多发送3000天的数据。

V1.0.5

May 30, 2024

Que Nguyen

  • Added Rate Limit Description

V1.0.6

Jun 8, 2024

Que Nguyen

  • Added Response Date Process Id resource

Release status

Environment

Status

Released Date

Version

DEV

Released

May 27, 2024

V1.0.6

UAT

RELEASED

Jun 3, 2024

V1.0.6

PROD

RELEASED

Jun 5, 2024

V1.0.5

Inverter Daily Data Resource

RemoteInvId (required) text

This refers to a unique identifier assigned to an inverter.

ex: STR1000000033862740

这指的是分配给逆变器的唯一标识符

例如:STR1000000033862740

Data (required) array[object] - Array of Daily Data Resource

This refers to data generation at a particular frequency type

Maximum generation data received per request payload: 3000 records

这指的是在特定频率类型下的数据生成。

一次性最大接受提交的电量记录数为3000,即一次性最多发送3000天的数据。

{ "Data": [ { "Timestamp": "2023-05-01", "PeriodProductionInKWh": "0.123", "AccumulatedEnergyInKWh": "5.123" }, { "Timestamp": "2023-05-02", "PeriodProductionInKWh": "0.234", "AccumulatedEnergyInKWh": "5.357" }, { "Timestamp": "2023-05-03", "PeriodProductionInKWh": "0.456", "AccumulatedEnergyInKWh": "5.813" } ], "RemoteInvId": "STR10000000338444" }

Daily Data Resource

Timestamp (required) text

The time to capture data in the format 'YYYY-MM-DD'

ex: 2023-04-05

捕获数据的时间,格式为 'YYYY-MM-DD'

例如:2023-04-05

PeriodProductionInKWh (required) number

Energy generation

ex: 0.123

日发电量

例如:0.123

AccumulatedEnergyInKWh (required) number

Accumulated Energy generation

累计发电量

ex: 100.123

{ "Timestamp": "2023-05-01", "PeriodProductionInKWh": "0.123", "AccumulatedEnergyInKWh": "5.123" }

API Definition

Post /public/v2/generation-datas

Request

Headers

Content-Type

application/json

Authorization

Bearer {{access_token}}

Payload

RemoteInvId (required) text

This refers to a unique identifier assigned to an inverter.

ex: STR1000000033862740

这指的是分配给逆变器的唯一标识符

例如:STR1000000033862740

Data[n].Timestamp (required) text

The time to capture data in the format 'YYYY-MM-DD'

ex: 2023-04-05

捕获数据的时间,格式为 'YYYY-MM-DD'

例如:2023-04-05

Data[n].PeriodProductionInKWh (required) number

Energy generation

ex: 0.123

日发电量

例如:0.123

Data[n].AccumulatedEnergyInKWh (required) number

Accumulated Energy generation

累计发电量

ex: 100.123

 

 

curl --location 'https://uat-api.redex.eco/public/v2/generation-datas' \ --header 'Authorization: Bearer {{access_token}}' \ --header 'Content-Type: application/json' \ --data '{ "RemoteInvId": "TLGMIV500002000338634980432-INV10EN", "Data": [ { "Timestamp": "2023-01-10", "PeriodProductionInKWh": 2727, "AccumulatedEnergyInKWh": 3167.201 }, { "Timestamp": "2023-01-11", "PeriodProductionInKWh": 2712.561, "AccumulatedEnergyInKWh": 1549.498 }, { "Timestamp": "2023-01-12", "PeriodProductionInKWh": 1918.889, "AccumulatedEnergyInKWh": 2950.647 } ] }'

Response

Headers

Content-Type

application/json

Response Body

Response Body

Data.ProcessId uuid

Process unique identifier

Errors list of error objects

Please see "Getting Started - #Error Object" for more details

请查看Getting Started - #Error Object以获得更多信息。

Meta null object

Return null object

StatusCode integer

Http Status codes standard. Example 200, 201, 404.

http状态码,如200,201,404

Message text

Response message: Success or error message.

返回成功或错误的信息。

 

201 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

  1. Rate Limit by Key:

    1. Key: This ensures that rate limits are applied uniquely for each business account id.

    2. Request Limit: Each key is allowed to make up to 5 requests per 5 seconds.

    3. Reset Interval: The limit resets every 5 seconds.

  2. Response Headers:

    1. 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