Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

Send Generation Data

This endpoint submits generation data for a single device.

此端点用于提交单个设备的发电数据。

Resource information

Response format(s)

JSON

Requires authentication?

Yes using token

Request Header

Name

dataGenerationRequest

Content-Type

application/json

Authorization

{{token}}

Parameters

Data

This refers to data generation at a particular frequency type

ex: [ OrderedMap { "timestamp": "2023-05-01", "periodProductionInKWh": "0.1234" }, OrderedMap { "timestamp": "2023-05-02", "periodProductionInKWh": "0.2345" }, OrderedMap { "timestamp": "2023-05-03", "periodProductionInKWh": "0.4567" } ]

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

例如:[ OrderedMap { "timestamp": "2023-05-01", "periodProductionInKWh": "0.1234" }, OrderedMap { "timestamp": "2023-05-02", "periodProductionInKWh": "0.2345" }, OrderedMap { "timestamp": "2023-05-03", "periodProductionInKWh": "0.4567" } ]

Timestamp

string

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

ex: 2023-04-05

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

例如:2023-04-05

PeriodProductionInKWh

number

Power generation

ex: 0.1234

发电量

例如:0.1234

FrequencyType

string

The type of frequency (i.e., Daily) for data retrieval

ex: Daily

数据检索的频率类型(例如,每日)

例如:每日

目前只支持每日

AccumulatedPowerInKWh

number

Accumulated Power generation

ex: 100.1234

RemoteInverterId

string

This refers to a unique identifier assigned to device or inverter

ex: STR1000000033862740

这指的是分配给设备的唯一标识符

例如:STR1000000033862740

Response Header

Content-Type

application/json

Response Body

Field

Type

Description | 描述

StatusCode

integer

Code 

ex: 401

代码

例如:401

Data

Message

string

Result message

ex: The token is invalid

结果消息

例如:令牌无效

Request

POST /public/v2/generation-data

Request

{
  "Data": [
    {
      "Timestamp": "2023-05-01",
      "PeriodProductionInKWh": "0.1234",
      "AccumulatedPowerInKWh": "5.1234"
    },
    {
      "Timestamp": "2023-05-02",
      "PeriodProductionInKWh": "0.2345",
      "AccumulatedPowerInKWh": "5.3579"
    },
    {
      "Timestamp": "2023-05-03",
      "PeriodProductionInKWh": "0.4567",
      "AccumulatedPowerInKWh": "5.8146"
    }
  ],
  "FrequencyType": "Daily",
  "RemoteInvId": "STR10000000338444"
}

Response

200 Success

{
  "Data": {},
  "StatusCode": 200,
  "Message": "Success"
}

400 Bad Request

{
  "Data": null
  "StatusCode": 400,
  "Message": "Bad Request"
}

422 Unprocessable Entity

{
  "Data": null,
  "StatusCode": 422,
  "Message": "Unprocessable Entity"
}

401 Unauthorized

{
  "Data": null,
  "StatusCode": 401,
  "Message": "Unauthorized"
}

403 Forbidden

{
  "Data": null,
  "StatusCode": 403,
  "Message": "Forbidden"
}
  • No labels