[GET] Query REC applications

Table of Contents

Changelogs

Version

Date

Changes by

Description of change

V 1.0.1

Jul 5, 2024

Que Nguyen

  • Added document

The REC application Resource

Id - guid

REC Application Unique Identifier

绿证申请唯一标识

ApplicationNumber - text

REC Application Unique number

绿证申请唯一数字码

DeviceName - text

Name Of Device or Grouped Device

设备名称

CountryCode - text

Country Alpha Two Code

国家编码

Energy - text

Device energy fuel

能源类型

Registry - object

Registry object with Value and Description

注册中心

Registry.Value - text

Registry Value

注册中心值

Registry.Description - text

Registry Description name

注册中心描述

Quantity - number

REC issuance total quantity

绿证签发总量

Status - object

Status object with Value and Description

状态

Status.Value - string

Status Value (Draft - InProgress - Approved - Rejected - Withdrawn - ToReSubmit)

状态类型

Status.Description - object

Status Description (Draft - In Progress - Approved - Rejected - Withdrawn - To Resubmit)

状态描述

VintageFrom - datetime

Issuance vintage from

发行起始时间

VintageTo - datetime

Issuance vintage to

发行结束时间

DeviceType - object

Device Type object with Value and Description

设备类型

DeviceType.Value - string

Device Type Value (Normal - Grouped)

设别类型值(常规 - 分组)

DeviceType.Description - object

Device Type Description (Normal - Grouped)

设备类型描述(常规 - 分组)

ProvinceCode - text

Province code

省份编码

FuelType - text

Fuel type name

燃料类型

{ "Id": "e37c097c-8f11-4878-afe3-08dc8c17656c", "ApplicationNumber": "1000000183401473", "DeviceName": "1 devices Sunny LM108", "CountryCode": "TH", "Energy": "Solar", "Registry": { "Value": "IREC", "Description": "I-REC" }, "Quantity": 46.593388, "Status": { "Value": "InProgress", "Description": "In-Progress" }, "VintageFrom": "2022-06-13T00:00:00", "VintageTo": "2022-06-30T00:00:00", "DeviceType": { "Value": "Grouped", "Description": "Grouped" }, "ProvinceCode": "Nonthaburi", "FuelType": "Group Solar Rooftop" }

 

API Definitions

GET /public/v2/rec-applications

Request

Headers

Authorization text

Authorization Bearer access token

Ex: Bearer {{access_token}}

Query Parameters

DeviceId (optional) uuid

Device unique id

设备唯一标识

Registries (optional) array[text] - enum

Registry value (IREC, TIGR)

注册中心(可选)(IREC, TIGR)

CountryCodes (optional) array[text]

Country alpha 2 code

国家编码

Statuses (optional) array[text]

Status of application (Draft - InProgress - Approved - Rejected - Withdrawn - ToReSubmit)

状态

DeviceTypes (optional) array[text]

Device type (Normal - Grouped)

设备类型

CurrentPage (optional) integer

The page number to retrieve the next set of grouped device’s devices. The number has to be greater than 1 and will default to 1.

当前页

ItemsPerPage (optional) integer

The maximum number of grouped device’s devices to return per page. This number can range from 10 to 100 and defaults to 100.

每页条数

 

curl -X 'GET' \ 'https://uat-api.redex.eco/public/v2/rec-applications?Registries=TIGR&Registries=IREC&CountryCodes=SG&CountryCodes=VN&CountryCodes=CN&Statuses=Draft&DeviceId=c7f469b9-31f8-4e44-850f-ef8e29972418&DeviceTypes=Normal&DeviceTypes=Grouped&CurrentPage=1&ItemsPerPage=10' \ -H 'accept: application/json'

 

Response

Response Body

Data list of rec application resource

A collection of REC Application Resource

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 200, 201, 404.

http状态码,如200,201,404

Message text

Response message: Success or error message.

返回成功或错误的信息。

{ "Data": [ { "Id": "e37c097c-8f11-4878-afe3-08dc8c17656c", "ApplicationNumber": "1000000183401473", "DeviceName": "1 devices Sunny LM108", "CountryCode": "TH", "Energy": "Solar", "Registry": { "Value": "IREC", "Description": "I-REC" }, "Quantity": 46.593388, "Status": { "Value": "InProgress", "Description": "In-Progress" }, "VintageFrom": "2022-06-13T00:00:00", "VintageTo": "2022-06-30T00:00:00", "DeviceType": { "Value": "Grouped", "Description": "Grouped" }, "ProvinceCode": "Nonthaburi", "FuelType": "Group Solar Rooftop" }, { "Id": "1d2f6e8f-4cb8-44dd-cca0-08dc59fbd6e0", "ApplicationNumber": "1000000796674104", "DeviceName": "Johur Baru Twinkle Star", "CountryCode": "MY", "Energy": "Solar", "Registry": { "Value": "IREC", "Description": "I-REC" }, "Quantity": 1000, "Status": { "Value": "Approved", "Description": "Approved" }, "VintageFrom": "2023-04-01T00:00:00", "VintageTo": "2023-04-30T00:00:00", "DeviceType": { "Value": "Normal", "Description": "Normal" }, "ProvinceCode": "Kedah", "FuelType": "Solar" } ], "Meta": { "CurrentPage": 1, "TotalPage": 1, "TotalItems": 2, "ItemsPerPage": 100 }, "Errors": null, "StatusCode": 200, "Message": "Success" }

 

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