GetFlowReport【获取流量使用数据】¶
获取流量使用数据:可根据查询的开始时间,结束时间和类型来查询流量报表信息。 如果不指定任何查询条件,则默认返回流量报表信息。
Request Parameters
Parameter name | Type | Description | Required |
---|---|---|---|
action | String | API 标识符 | Yes |
domainId | String | 域 ID | No |
start_at | String | 查询流量报表的开始时间 | No |
end_at | String | 查询流量报表的结束时间 | No |
type | String | 流量报表的类型,有效值flow,bandwidth | No |
Response Elements
Name | Type | Description |
---|---|---|
message | String | 执行结果信息 |
code | Integer | HTTP Resonpe响应状态码 |
data | Array | 最近一月流量访问统计信息列表 index 0:某时刻
index 1:流量访问量
|
Example
Example Request:
Request Headers:
POST /api/ HTTP/1.1
Origin: https://console.plcloud.com
X-CSRFToken: 6An6xEuOJqW6dVDtlgzZr6FqgkSbJmqp
Content-Type: application/json
JSON Data:
{
"action": "GetFlowReport"
}
{
"action": "GetFlowReport",
"domainId": "",
"start_at": "2015-02-01",
"end_at": "2015-02-09",
"type": "flow"
}
{
"action": "GetFlowReport",
"domainId": "",
"start_at": "2015-02-01",
"end_at": "2015-02-09",
"type": "bandwidth"
}
Example Response:
{
"message": "Success",
"code": 200,
"data": [
[
1420905600000,
4180.09
],
[
1420992000000,
4085.05
],
[
1421078400000,
4566.79
],
[
1421164800000,
4563.65
],
[
1421251200000,
4406.8
],
[
1421337600000,
5626.08
],
[
1421424000000,
6196.34
],
[
1421510400000,
6190.38
],
[
1421596800000,
4289.54
],
[
1421683200000,
4122
],
[
1421769600000,
4212.85
],
[
1421856000000,
4955.2
],
[
1421942400000,
4887.79
],
[
1422028800000,
5787.35
],
[
1422115200000,
5270.24
],
[
1422201600000,
3752.23
],
[
1422288000000,
4879.139999999999
],
[
1422374400000,
5985.5
],
[
1422460800000,
4886.8099999999995
],
[
1422547200000,
4431.639999999999
],
[
1422633600000,
5251.79
],
[
1422720000000,
4837.87
],
[
1422806400000,
4368.24
],
[
1422892800000,
4471.8099999999995
],
[
1422979200000,
4705.65
],
[
1423065600000,
5277.43
],
[
1423152000000,
3480.36
],
[
1423238400000,
1208.2799999999997
],
[
1423324800000,
4962.540000000001
],
[
1423411200000,
604.05
]
]
}