[GET] Get Grouped Device Application's devices and inverters

This API are designed for you to be able to query your grouped device application’s devices and inverters information.

Table of Contents

 

Changelogs

Version

Date

Changes by

Description of change

V 1.0.1

Jun 4, 2024

Que Nguyen

  • Added document for API query details

V 1.0.2

Jul 31, 2024

Que Nguyen

  • Change the data type of inverter id from uuid to int(bigint)

 

Release status

Environment

Status

Released Date

Version

DEV

Released

Jun 4, 2024

V1.0.1

UAT

Released

Jun 4, 2024

V1.0.1

PROD

Released

Jun 11, 2024

V1.0.1

The Device - Inverter Resource

The primary resource that you will be interacting with when querying the Grouped Device’s information

Id uuid

A Device unique identifier

InstallationName text

The installation name of a device represents the project device. This name must match the value stated on the Owner Declaration Form in the appendix table.

Address text

Device’s physical address.

PostalCode text

Device’s postal code.

Latitude decimal(2,6)

The co-ordinates must demonstrate the location of the device. These co-ordinates must belong in the country/province identified previously.

Longitude decimal(3,6)

The co-ordinates must demonstrate the location of the device. These co-ordinates must belong in the country/province identified previously.

GridConnectionDate text - format YYYY-MM-DD

The date when the device connected to the electrical grid and was commissioned. The grid connection date must not be in the future.

OwnersDeclarationStartDate text - format YYYY-MM-DD

Owner's Declaration Start Date: The date when permission begins for requesting issuance on behalf of a device owner. This date must be on or before the issuance request date.

Datetime in format: YYYY-MM-DD

OwnersDeclarationEndDate (optional) text - format YYYY-MM-DD

Owner's Declaration End Date

Datetime in format: YYYY-MM-DD

Domestic boolean

Indicates whether the installation is on a domestic property or not.

FeedInTariff boolean

Feed In Tariff

DeclarationFormFileId uuid

Declaration form file’s file ID retrieved using the API.

PercentageRenewable decimal(3,6)

Device’s Percentage Renewable

Must be in range 0 <= value <= 100

Timezone text

Its Grouped Device Time zone information.

Sample: UTC+08:00

CreatedTime datetime

The time when application created

Datetime time zone: UTC

More details

Inverters array of objects

{ "Id": 1, "RemoteInvId": "RM1000020898439275847-T", "BrandCode": "HW21", "OtherBrandName": "", "ElectronicSerialNumber": "HW8984392758437-T", "InstalledCapacity": 9.9, "CreatedTime": "2024-06-05T03:18:34.469Z" }

Inverters[m].Id numeric - bigint

Inverter Unique Id

Inverters[m].RemoteInvId text - max length (100)

Remote Inverter Id

Inverters[m].ElectronicSerialNumber text - max length (255)

Inverter Electronic Serial Number

Inverters[m].BrandCode text - max length (20)

Inverter Brand Code. Reference codes

[GET] Query Inverter Brands

Inverters[m].OtherBrandName text - max length (255)

Inverter Other Brand Name

Inverters[m].InstalledCapacity decimal(12,3)

Inverter Installed Capacity in kW. Maximum capacity 1000 kW (1MW)

CreatedTime datetime

The time when application created

Datetime time zone: UTC

More details

{ "Id": "347847fa-68c0-4418-9119-08dc3993455a", "InstallationName": "Kong Meng San Phor Kark See Monastery", "Address": "88 Bright Hill Road", "PostalCode": "431231", "Longitude": 1.361516, "Latitude": 1.361516, "GridConnectionDate": "2022-05-15", "OwnersDeclarationStartDate": "2022-05-15", "OwnersDeclarationEndDate": "2022-10-15", "Domestic": false, "FeedInTariff": false, "DeclarationForm": "a70fa68f-58a9-46d1-a338-f2e023af3194", "PercentageRenewable": 45.55, "Timezone": "UTC+08:00", "CreatedTime": "2024-06-05T03:18:34.469Z", "Inverters": [ { "Id": 1, "RemoteInvId": "RM1000020898439275847-T", "BrandCode": "HW21", "OtherBrandName": "", "ElectronicSerialNumber": "HW8984392758437-T", "InstalledCapacity": 9.9, "CreatedTime": "2024-06-05T03:18:34.469Z" } ] }

 

API Definitions

GET /public/v2/device-applications/{deviceApplicationId}/devices

Example: /public/v2/device-applications/347847fa-68c0-4418-9119-08dc3993455a/devices

Request

Headers

Authorization text

Authorization Bearer access token

Ex: Bearer {{access_token}}

Path

deviceApplicationId uuid

A Device application unique identifier

Query Parameters

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.

Example request

curl -X 'GET' \ 'https://uat-api.redex.eco/public/v2/device-applications/347847fa-68c0-4418-9119-08dc3993455a/devices?CurrentPage=1&ItemsPerPage=10' \ -H 'Authorization: Bearer <access_token>' -H 'accept: application/json'

 

Response

Response Body

Data list of grouped device’s devices

A collection of Device Inverter 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.

返回成功或错误的信息。

Example Response

200 OK

 

404 Not Found

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