调用DescribeVodDomainTrafficData获取加速域名的网络流量监控数据。
接口说明
使用说明
- 支持批量查询。
- 不指定StartTime和EndTime时,默认读取过去24小时的数据。也可以按指定的起止时间查询,必须同时指定StartTime和EndTime,最多可获取近90天的数据。
QPS限制
本接口的单用户QPS限制为100次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见QPS限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DomainName | string | 否 | 要查询的域名。若为空,则默认返回所有加速域名的合并数据。支持批量查询,多个域名之间用半角逗号(,)分隔。 | example.com |
StartTime | string | 否 | 获取数据起始时间点。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 说明最小数据粒度为5分钟。若为空,则默认读取最近24小时的数据。 | 2019-01-20T13:59:58Z |
EndTime | string | 否 | 结束时间,需晚于起始时间。格式为:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 | 2019-01-20T14:59:58Z |
Interval | string | 否 | 查询数据的时间粒度。单位:秒。支持300、3600和86400。不传和传的值不支持时,使用默认值。
| 300 |
IspNameEn | string | 否 | 运营商英文名。不传入该参数,默认查询所有运营商。 | Alibaba |
LocationNameEn | string | 否 | 地域英文名。不传入该参数,默认查询所有地域。目前仅支持上海地域。 | cn-shanghai |
返回参数
示例
请求示例
http(s)://vod.cn-shanghai.aliyuncs.com/?Action=DescribeVodDomainTrafficData
&DomainName=example.com
&StartTime=2019-01-20T13:59:58Z
&EndTime=2019-01-20T14:59:58Z
&Interval=300
&IspNameEn=Alibaba
&LocationNameEn=cn-shanghai
&<公共请求参数>
正常返回示例
JSON
格式
{
"RequestId": "D94E471F-1A27-442E-552D-D4D2000C****",
"EndTime": "2019-01-20T14:59:58Z",
"TrafficDataPerInterval": {
"DataModule": [
{
"OverseasValue": 0,
"HttpsValue": 0,
"Value": 0,
"HttpsDomesticValue": 0,
"HttpsOverseasValue": 0,
"TimeStamp": "2019-01-15T14:00:00Z",
"DomesticValue": 0
},
{
"OverseasValue": 0,
"HttpsValue": 0,
"Value": 0,
"HttpsDomesticValue": 0,
"HttpsOverseasValue": 0,
"TimeStamp": "2019-01-15T14:00:00Z",
"DomesticValue": 0
}
]
},
"DomainName": "example.com",
"DataInterval": 3600,
"StartTime": "2019-01-15T13:59:59Z"
}
XML
格式
<DescribeVodDomainTrafficDataResponse>
<RequestId>D94E471F-1A27-442E-552D-D4D2000C****</RequestId>
<EndTime>2019-01-20T14:59:58Z</EndTime>
<TrafficDataPerInterval>
<DataModule>
<OverseasValue>0</OverseasValue>
<HttpsValue>0</HttpsValue>
<Value>0</Value>
<HttpsDomesticValue>0</HttpsDomesticValue>
<HttpsOverseasValue>0</HttpsOverseasValue>
<TimeStamp>2019-01-15T14:00:00Z</TimeStamp>
<DomesticValue>0</DomesticValue>
</DataModule>
<DataModule>
<OverseasValue>0</OverseasValue>
<HttpsValue>0</HttpsValue>
<Value>0</Value>
<HttpsDomesticValue>0</HttpsDomesticValue>
<HttpsOverseasValue>0</HttpsOverseasValue>
<TimeStamp>2019-01-15T14:00:00Z</TimeStamp>
<DomesticValue>0</DomesticValue>
</DataModule>
</TrafficDataPerInterval>
<DomainName>example.com</DomainName>
<DataInterval>3600</DataInterval>
<StartTime>2019-01-15T13:59:59Z</StartTime>
</DescribeVodDomainTrafficDataResponse>
错误码
访问错误中心查看更多错误码。
接口错误码
下表列举了本接口特有的错误码。
错误代码 | 错误信息 | HTTP 状态码 | 说明 |
---|---|---|---|
Throttling | Request was denied due to request throttling. | 503 | 请求被流量控制限制。 |
IllegalOperation | Illegal domain, operation is not permitted. | 403 | 非法域名, 无法操作。 |
OperationDenied | Your account does not open CDN service yet. | 403 | 未开通CDN服务。 |
OperationDenied | Your CDN service is suspended. | 403 | CDN服务已被停止。 |
InvalidDomain.NotFound | The domain provided does not belong to you. | 404 | 域名不存在或不属于当前用户。 |
InvalidDomain.Offline | The domain provided is offline. | 404 | 域名已下线。 |
ServiceBusy | The specified Domain is configuring, please retry later. | 403 | 域名正在配置中, 请稍后再试。 |
InvalidDomain.Configure_failed | Failed to configure the provided domain. | 500 | 域名配置失败。 |
MissingParameter | StartTime and EndTime can not be single. | 400 | StartTime和EndTime不能单独设置。 |
InvalidStartTime.Malformed | Specified start time is malformed. | 400 | StartTime格式错误。 |
InvalidEndTime.Malformed | Specified end time is malformed. | 400 | EndTime格式错误。 |
InvalidEndTime.Mismatch | Specified end time does not match the specified start time. | 400 | EndTime小于StartTime。 |
InvalidStartTime.ValueNotSupported | Specified end time does not match the specified start time. | 400 | EndTime和StartTime差值超过90天。 |