This API are designed for you to be able to query your process’s status that is processing your sending generation data.
Table of Contents
Changelogs
Version | Date | Changes by | Description of change |
V 1.0.1 |
| Que Nguyen |
|
Release status
Environment | Status | Released Date | Version |
DEV | RELEASED |
| V1.0.1 |
UAT | RELEASED |
| V1.0.1 |
PROD | NOT RELEASED |
The Process Resource
The primary resource that you will be interacting with when querying the Processing Generation Data information
ProcessId integer - bigint A Process unique identifier |
Status enum text - (New, Processing, Failed, Success) Process’s status |
ProcessingType text - (CreateNewGenerationData, CreateMonthlyData) Processing type |
CreatedTime - datetime with Time Zone Process’s created time |
UpdatedTime - datetime with Time Zone Process’s updated time |
{ "ProcessId": 20745, "Status": "Success", "CreatedTime": "2024-06-05T15:26:42.45", "UpdatedTime": "2024-06-05T15:35:14.0266667", "ProcessingType": "CreateNewGenerationData" }
{ "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": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "RemoteInvId": "RM1000020898439275847-T", "BrandCode": "HW21", "OtherBrandName": "", "ElectronicSerialNumber": "HW8984392758437-T", "InstalledCapacity": 9.9, "CreatedTime": "2024-06-05T03:18:34.469Z" } ] }
API Definitions
GET /public/v2/generation-datas/status
Example: /public/v2/generation-datas/status?ProcessId=20745
Request
Headers
Authorization text Authorization Bearer access token Ex: |
Query Parameters
ProcessId (required) integer - bigint A Process unique identifier |
Example request
curl -X 'GET' \ 'https://uat-api.redex.eco/public/v2/generation-datas/status?ProcessId=20745' \ -H 'accept: application/json' \ -H 'Authorization: Bearer <access_token>'
Response
Response Body |
Data Process resource A process source data |
Errors list of error objects Please see "Getting Started - #Error Object" for more details 请查看Getting Started - #Error Object以获得更多信息。 |
Meta empty resource |
StatusCode integer Http Status codes standard. Example http状态码,如200,201,404 |
Message text Response message: Success or error message. 返回成功或错误的信息。 |
Example Response
200 OK
{ "Data": { "ProcessId": 20745, "Status": "Success", "CreatedTime": "2024-06-05T15:26:42.45", "UpdatedTime": "2024-06-05T15:35:14.0266667", "ProcessingType": "CreateNewGenerationData" }, "Meta": null, "Errors": null, "StatusCode": 200, "Message": "Success" }
422 Unprocessable Entity
{ "Data": null, "Meta": null, "Errors": null, "StatusCode": 422, "Message": "The Process Id 207452 does not exist." }
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
Rate Limit by Key:
Key: This ensures that rate limits are applied uniquely for each business account id.
Request Limit: Each key is allowed to make up to 5 requests per 5 seconds.
Reset Interval: The limit resets every 5 seconds.
Response Headers:
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
HTTP/1.1 429 Too Many Requests Retry-After: 60 Content-Type: application/json { "Data": null, "Errors": null, "StatusCode": 429, "Message": "Rate limit exceeded", "Meta": null }