该接口用于查询指定资源的读写qps信息,用户可以通过指定空间或者区域以及时间范围,查询每个空间/每个区域每分钟的读写请求的qps明细,该信息可用于客户监控数据的被访问情况。
参数名称 | 描述 |
---|---|
bucketListList | 空间名 |
regionNameListList | 节点名称 |
*dateFromString | 查询开始时间,例如:2024-12-12T10:00+08:00,包含开始时间 |
*dateToString | 查询j结束时间,例如:2024-12-12T10:01+08:00,包含结束时间 |
typeString | write:写, read:读, 不传则查读和写 |
timezoneString | 返回数据的时区。 格式:+0N:00,-12<= n <= 12。如:+08:00。 默认+08:00 |
参数名称 | 描述 |
---|---|
codeString | 错误码 |
messageString | 错误信息 |
dataList | |
bucketString | 空间名 |
regionNameString | 节点名称 |
detailList | 写 |
timeString | 时间 |
readValueDouble | 每分钟的读qps。保留两位小数,每分钟的qps=请求数/60 |
writeValueDouble | 每分钟的写qps。保留两位小数,每分钟的qps=请求数/60 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
22120200 | Success | 200 | 成功 |
22120401 | This operation requires a body. Ensure that the body is present. | 400 | 请求体没有传递 |
22120402 | The body of your request is not json. | 400 | 请求体格式错误 |
22120403 | Some parameters are required and not filled. | 400 | 必填参数未填 |
22120404 | The date specified is invalid. | 400 | 时间格式非法 |
22120405 | You cannot specify a period greater than %s hour. | 400 | 查询时间跨度太长 |
22120406 | The parameter of timezone is invalid. | 400 | 时区格式无效 |
22120407 | The bucket and regionname parameters cannot exist at the same time. | 400 | 空间和节点名称不能同时传入 |
22120408 | The parameter of type is invalid. | 400 | 参数type不合法 |
22120409 | Account is invalid. | 400 | 账号无效 |
22120410 | The dateFrom must be within the last %s days. | 400 | 开始时间未在规定时间范围内 |
22120500 | Server error. | 500 | 服务端错误 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://api.cdnetworks.com/api/gdp/wcs/qps" \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -d '{ "bucketList":[ "test1", "test2" ], "dateFrom":"2024-12-12T00:01+08:00", "dateTo":"2024-12-12T00:02+08:00" }'
{ "code": "22120200", "message": "Success", "data":[ { "bucket":"test1", "detail":[ { "time":"2024-12-12T00:01+08:00", "readValue":150.00, "writeValue":156.24 }, { "time":"2024-12-12T00:02+08:00", "readValue":150.00, "writeValue":156.24 } ] }, { "bucket":"test2", "detail":[ { "time":"2024-12-12T00:01+08:00", "readValue":150.00, "writeValue":156.24 }, { "time":"2024-12-12T00:02+08:00", "readValue":150.00, "writeValue":156.24 } ] } ] }