Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com> Co-authored-by: qinweiwei <qinweiwei@huawei.com> Co-committed-by: qinweiwei <qinweiwei@huawei.com>
26 KiB
Querying the QPS Statistics
Function
This API is used to query the website QPS statistics.
URI
GET /v1/{project_id}/waf/overviews/qps/timeline
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID |
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). |
Content-Type |
No |
String |
Content type. Default value: application/json;charset=utf8 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
[items] |
Array of ListQpsTimelineItem objects |
ListQpsTimelineResponseBody |
Parameter |
Type |
Description |
|---|---|---|
key |
String |
The following statistics can be included: |
timeline |
Array of TimeLineItem objects |
TimeLineItem |
Parameter |
Type |
Description |
|---|---|---|
time |
Long |
Time-point |
num |
Integer |
Quantity. Aggregated data is returned. The num field indicates the statistical value between the time point and the previous time point. |
Status code: 400
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 401
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Example Requests
GET https://{Endpoint}/v1/{project_id}/waf/overviews/qps/timeline?from=1650470400196&to=1650522936196
Example Responses
Status code: 200
Request succeeded.
[ {
"key" : "ACCESS",
"timeline" : [ {
"time" : 1650470400000,
"num" : 0
} ]
}, {
"key" : "PRECISE",
"timeline" : [ {
"time" : 1650470400000,
"num" : 0
} ]
}, {
"key" : "CRAWLER",
"timeline" : [ {
"time" : 1650470400000,
"num" : 0
} ]
}, {
"key" : "CC",
"timeline" : [ {
"time" : 1650470400000,
"num" : 0
} ]
}, {
"key" : "TOTAL_ATTACK",
"timeline" : [ {
"time" : 1650470400000,
"num" : 0
} ]
}, {
"key" : "WEB_ATTACK",
"timeline" : [ {
"time" : 1650470400000,
"num" : 0
} ]
} ]
Status Codes
Status Code |
Description |
|---|---|
200 |
Request succeeded. |
400 |
Invalid request |
401 |
The token does not have the required permission. |
500 |
Internal server error. |
Error Codes
See Error Codes.