[GET] Query Device Application

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

Apr 10, 2024

Que Nguyen

  • Added Release Status table.

V1.0.2

May 30, 2024

Que Nguyen

  • Added Rate Limit Description

Release status

Environment

Status

Released Date

Version

DEV

Released

Mar 25, 2024

V1.0.2

UAT

Released

Mar 25, 2024

V1.0.1

PROD

Released

Mar 25, 2024

V1.0.1

API Definitions

Get all device applications including grouped, normal, aggregated, rooftop.

Resource information

 

Response format(s)

JSON

 

Requires authentication?

Yes using Access Token

 

Request Header

Name

Value

Authorization

Bearer {{access_token}}

 

Parameters

 

Registries

  • array[string]

  • query

 

Filter the items by Registry

通过注册处过滤。

  • IREC

  • TIGR

Status

  • string

  • query

Filter the item by Status

通过状态过滤,具体描述请看下面的Status definitions。

  • Unverified

  • InProgress

  • Approved

  • Declined

CountryCodes

  • array[string]

  • query

Filter the items by Countries' codes

通过国家编号过滤

The codes are from ISO 3166-1 alpha-2 (Two letters country code)

Energies

  • array[string]

  • query

Filter the items by aggregated fuel types without technology (called as energy), used to produce electricity.

通过聚合燃料类型过滤

  • Biomass

  • Geothermal

  • Hydro

  • Solar

  • Wind

DeviceTypes

  • array[string]

  • query

Filter the items by the device type

通过设备类型过滤

  • Normal

  • Grouped

Search

  • string

  • query

Enter search data that can be used to search on each item. You can search by:

  • Device Name

  • Energy

输入相关的文本查询设备,目前只支持检索设备的DeviceName和Energies字段。

CurrentPage

  • numeric

  • query

Request field for pagination. The Page that you wish to view

用于分页的请求字段

ItemsPerPage

  • numeric

  • query

The total items that return in the response

分页的每页数据数

OrderBy

  • string

  • query

Sorting field, Default sorting is get all items sort by CreatedDate Desc

Values:

  • CreatedDate

  • To Be Updated

排序字段,默认按CreatedDate Desc排序。

IsDescending

  • boolean

  • query

Used in OrderBy

default: true

是否降序排序,对于OrderBy使用,默认为true。

Returns

Returns all device applications

 

 

Response Header

Content-Type

application/json

Response Body

Field

Type

Description

Id

uuid

Device Application unique identifier

设备申请Id

ApplicationNumber

string

Device Application Unique Number

设备申请编号(仅用于UI展示)

DeviceName

string

Name Of Device Application

设备名称

FuelType

string

Device's fuel type

设备燃料类型

EnergyValue

string

Device's energy value

设备能源类型

Status:Value

string

  • InProgress 进行中

  • Unverified 未验证

  • Approved 已批准

  • Declined 已拒绝

Status:Description

string

Status Description

  • In Progress 进行中

  • Unverified 未验证

  • Approved 已批准

  • Declined 已拒绝

状态描述

Registry:Value

string

注册处

  • IREC

  • TIGR

Registry:Description

string

注册处描述

  • I-REC

  • TIGR

CountryCode

string

Country Alpha Two Code

国家代码

CreatedTime

DateTime

Time the application created

Date time UTC format. More details

创建时间

UpdatedTime

DateTime

Last time the application updated

Date time UTC format. More details

更新时间

AnnualGeneration

decimal(18,6)

Total annual generation in MWh

年度产生的电量,以兆瓦时为单位。

Capacity

decimal(18,6)

Capacity in MW

根据evident要求去设置的设备容量

OriginalCapacity

decimal(18,6)

Capacity in MW

客户原始传的设备容量

DeviceType:Value

string

Device's type

  • Normal 正常

  • Grouped 分组设备

设备类型

DeviceType:Description

string

Device's Description

  • Normal 正常

  • Grouped 分组设备

设备描述

Meta:CurrentPage

numeric

Details described here Getting Started# Pagination

Meta:TotalPage

numeric

Details described here Getting Started# Pagination

Meta:TotalItems

numeric

Details described here Getting Started# Pagination

Meta:ItemsPerPage

numeric

Details described here Getting Started# Pagination

Request

GET /public/v2/device-applications

?Registries=IREC&CountryCodes=SG&Energies=Biomass&DeviceTypes=Grouped

Response

200 Success

{ "Data": [ { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ApplicationNumber": "1000000014414286", "DeviceName": "LYS Genco Alpha", "Status": { "Value": "InProgress", "Description": "In Progress" }, "Registry": { "Value": "IREC", "Description": "I-REC" }, "EnergyValue": "Solar", "FuelType": "ES100", "CountryCode": "SG", "CreatedTime": "2023-07-12T02:34:05.513Z", "UpdatedTime": "2023-07-12T02:34:05.513Z", "AnnualGeneration": 1, "Capacity": 9.999999, "OriginalCapacity": 9.999999, "DeviceType": { "Value" : "Normal", "Description": "Normal" } }, { "Id": "5f643fa8-4562-5717-fcb3-66afa62c963f", "ApplicationNumber": "1000000015514286", "DeviceName": "Grouped Device 001", "Status": { "Value": "Unverified", "Description": "Unverified" }, "Registry": { "Value": "IREC", "Description": "I-REC" }, "EnergyValue": "Solar", "FuelType": "ES110", "CountryCode": "SG", "CreatedTime": "2023-07-12T02:34:05.513Z", "UpdatedTime": "2023-07-12T02:34:05.513Z", "AnnualGeneration": 1, "Capacity": 3, "OriginalCapacity": 1.999999, "DeviceType": { "Value" : "Grouped", "Description": "Grouped" } } ], "Errors": [], "Meta": { "CurrentPage": 5, "TotalPage": 7, "ItemsPerPage": 1, "TotalItems": 64 }, "StatusCode": 200, "Message": "Success" }

 

 

 

400 Bad Request

{ "Data": null, "StatusCode": 400, "Errors": [], "Meta": null, "Message": "Bad Request" }

 

401 Unauthorized

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status definitions:

Status

Definition

Status

Definition

Unverified

Device registered with a flag saying it can push generation data.

设备提交后的初始状态为unverified,运营团队会进行审核并提交到注册处。

InProgress

Device has been verified by REDEX ops team and submitting to Registry for approval

已经被运营团队审核并提交到注册处以获得批准。

Approved

Device has been approved by Registry Issuer

设备已被注册处批准。

Declined

Device has been declined by REDEX ops team or Registry Issuer

设备被REDEX运营团队或注册处拒绝。

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: 60 requests per 1 minute(s)

  • Renewal Period: 60 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 60 requests per minute.

    3. Reset Interval: The limit resets every 60 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