Monitoring the Read/Write Ratio
Function
This API is used to query read and write times of a DDM instance in a specified time range.
Constraints
None
URI
GET /v2/{project_id}/instances/{instance_id}/read-write-ratio?curPage={curPage}&perPage={perPage}&startDate={startDate}&endDate={endDate}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
instance_id |
Yes |
String |
DDM instance ID |
curPage |
Yes |
String |
Number of records displayed on each page. The start value cannot be less than 0. |
perPage |
Yes |
String |
Page size (number of records on each page). |
startDate |
Yes |
String |
Start time in UTC, accurate to milliseconds |
endDate |
Yes |
String |
End time in UTC, accurate to milliseconds |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
totalRecord |
Integer |
Respective number of reads and writes on DDM |
readWriteRatioList |
Array of ReadWriteRatioList objects |
Information about reads and writes on DDM |
Parameter |
Type |
Description |
---|---|---|
schema |
String |
Schema name |
table |
String |
Logical table name |
readCount |
String |
Number of reads on the DDM instance within the specified period of time |
writeCount |
String |
Number of writes on the DDM instance within the specified period of time |
relationTables |
String |
Associated tables |
lastUpdated |
String |
Time when the read or write statement is last executed |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Example Request
GET https://{endpoint}/v2/{project_id}/instances/{instance_id}/read_write_ratio?curPage={curPage}&perPage={perPage}&startDate={startDate}&endDate={endDate}
Example Response
Status code: 200
OK
{ "totalRecord": 2, "readWriteRatioList": [ { "schema": "xxxx", "table": "xxxx", "readCount": "215", "writeCount": "46", "relationTables": "xxxx", "lastUpdated": "1619404869724" } ] }
Status code: 400
bad request
{ "externalMessage" : "Parameter error.", "errCode" : "DBS.280001" }
Status code: 500
server error
{ "externalMessage" : "Parameter error.", "errCode" : "DBS.280001" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
bad request |
500 |
server error |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot