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
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 |
|
| V1.0.1 | ||||||
UAT |
|
| V1.0.1 | ||||||
PROD |
|
| V1.0.1 |
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 |
Code Block | ||
---|---|---|
| ||
{ "ProcessId": 20745, "Status": "Success", "CreatedTime": "2024-06-05T15:26:42.45", "UpdatedTime": "2024-06-05T15:35:14.0266667", "ProcessingType": "CreateNewGenerationData" } |
API Definitions
Status | ||||
---|---|---|---|---|
|
/public/v2/generation-datas/statuses
Example: /public/v2/generation-datas/statuses?ProcessId=20745
Request
Headers
Authorization text Authorization Bearer access token Ex: |
Query Parameters
ProcessId (required) integer - bigint A Process unique identifier |
Example request
Code Block |
---|
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
Info |
---|
200 OK |
Code Block | ||
---|---|---|
| ||
{ "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" } |
Warning |
---|
422 404 Unprocessable Entity |
Code Block | ||
---|---|---|
| ||
{ "Data": null, "Meta": null, "Errors": null, "StatusCode": 422404, "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
Code Block | ||
---|---|---|
| ||
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 } |