开发者社区> 问答> 正文

如何查询PV数据?



DescribeDomainPvData



描述


获取加速域名最小1小时粒度的 PV页面访问统计
不指定StartTime和EndTime时,默认读取过去24小时的数据,同时支持按指定的起止时间查询,两者需要同时指定。

  • 只支持一个域名,或当前用户下所有域名
  • 最多可获取最近90天的数据


请求参数

参数类型必要描述
ActionString操作接口名,系统规定参数取值:DescribeDomainPvData
DomainNameString需要查询的加速域名,只支持一个域名,不写代表当前用户下所有域名
StartTimeString获取数据起始时间点,日期格式按照ISO8601表示法,并使用UTC时间。格式为:YYYY-MM-DDThh:mmZ最小数据粒度为1小时不写默认读取过去24小时数据
EndTimeString结束时间需大于起始时间;获日期格式按照ISO8601表示法,并使用UTC时间。格式为:YYYY-MM-DDThh:mmZ


返回参数

名称类型描述
RequestIdString请求ID
DomainNameString加速域名信息
DataIntervalString每条记录的时间间隔,固定值1小时或1天
StartTimeDateTime开始时间
EndTimeDateTime结束时间
PvDataIntervalUsageData[]每个时间间隔的页面访问次数


UsageData

名称类型描述
TimeStampString时间片起始时刻
ValueString详细使用数据


特殊错误码

错误代码描述Http 状态码语义
ThrottlingRequest was denied due to request throttling.503请求被流量控制限制
IllegalOperationIllegal domain, operation is not permitted.403非法域名, 无法操作
OperationDeniedYour account does not open CDN service yet.403未开通CDN服务
OperationDeniedYour CDN service is suspended.403CDN服务已被停止
InvalidDomain.NotFoundThe domain provided does not belong to you.404域名不存在或不属于当前用户
InvalidDomain.OfflineThe domain provided is offline.404域名已下线
ServiceBusyThe specified Domain is configuring, please retry later.403域名正在配置中, 请稍后再试
InvalidDomain.Configure_failedFailed to configure the provided domain.500域名配置失败
MissingParameterStartTime and EndTime can not be single.400StartTime和EndTime不能单独设置
InvalidStartTime.MalformedSpecified StartTime is malformed.400StartTime格式错误
InvalidEndTime.MalformedSpecified EndTime is malformed.400EndTime格式错误
InvalidEndTime.MismatchSpecified end time does not math the specified start time.400EndTime小于StartTime
InvalidStartTime.ValueNotSupportedSpecified end time does not math the specified start time.400EndTime和StartTime差值超过90天
InvalidDomainName.ValueNotSupportedThe specified value of parameter DomainName only support one or empty value.400DomainName只支持一个值或者不填


示例


请求示例: http://cdn.aliyuncs.com?Action=DescribeDomainPvData&DomainName=test.com
&StartTime=2015-11-28
&EndTime=2015-11-29
&<公共请求参数>


返回示例:
JSON格式 {
    "DataInterval": "3600",
    "RequestId": "BCD7D917-76F1-442F-BB75-C810DE34C761",
    "DomainName": "test.com",
    "EndTime": "2015-11-29",
    "PvDataInterval": {
        "UsageData": [
            {
                "TimeStamp": "2015-11-28T03:00:00Z",
                "Value": "9292"
            },
            {
                "TimeStamp": "2015-11-28T23:00:00Z",
                "Value": "9239"
            },
            {
                "TimeStamp": "2015-11-28T07:00:00Z",
                "Value": "9464"
            },
            {
                "TimeStamp": "2015-11-28T12:00:00Z",
                "Value": "9379"
            },
            {
                "TimeStamp": "2015-11-28T22:00:00Z",
                "Value": "9243"
            },
            {
                "TimeStamp": "2015-11-28T10:00:00Z",
                "Value": "10063"
            },
            {
                "TimeStamp": "2015-11-28T15:00:00Z",
                "Value": "9068"
            },
            {
                "TimeStamp": "2015-11-28T14:00:00Z",
                "Value": "9353"
            },
            {
                "TimeStamp": "2015-11-28T04:00:00Z",
                "Value": "9513"
            },
            {
                "TimeStamp": "2015-11-28T02:00:00Z",
                "Value": "9377"
            },
            {
                "TimeStamp": "2015-11-28T08:00:00Z",
                "Value": "9579"
            },
            {
                "TimeStamp": "2015-11-28T20:00:00Z",
                "Value": "9109"
            },
            {
                "TimeStamp": "2015-11-28T09:00:00Z",
                "Value": "10631"
            },
            {
                "TimeStamp": "2015-11-28T06:00:00Z",
                "Value": "9587"
            },
            {
                "TimeStamp": "2015-11-28T01:00:00Z",
                "Value": "9108"
            },
            {
                "TimeStamp": "2015-11-28T16:00:00Z",
                "Value": "9454"
            },
            {
                "TimeStamp": "2015-11-28T21:00:00Z",
                "Value": "9285"
            },
            {
                "TimeStamp": "2015-11-28T19:00:00Z",
                "Value": "9059"
            },
            {
                "TimeStamp": "2015-11-28T00:00:00Z",
                "Value": "9470"
            },
            {
                "TimeStamp": "2015-11-28T05:00:00Z",
                "Value": "11830"
            },
            {
                "TimeStamp": "2015-11-28T13:00:00Z",
                "Value": "9992"
            },
            {
                "TimeStamp": "2015-11-28T17:00:00Z",
                "Value": "9529"
            },
            {
                "TimeStamp": "2015-11-28T18:00:00Z",
                "Value": "9203"
            },
            {
                "TimeStamp": "2015-11-28T11:00:00Z",
                "Value": "9604"
            }
        ]
    },
    "StartTime": "2015-11-28"
}


XML格式: <DescribeDomainPvDataResponse>
  <DataInterval>3600</DataInterval>
  <RequestId>BC462C42-7580-468C-A346-03BCAD7503F6</RequestId>
  <DomainName>test.com</DomainName>
  <EndTime>2015-11-29</EndTime>
  <PvDataInterval>
    <UsageData>
      <TimeStamp>2015-11-28T03:00:00Z</TimeStamp>
      <Value>9292</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T23:00:00Z</TimeStamp>
      <Value>9239</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T07:00:00Z</TimeStamp>
      <Value>9464</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T12:00:00Z</TimeStamp>
      <Value>9379</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T22:00:00Z</TimeStamp>
      <Value>9243</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T10:00:00Z</TimeStamp>
      <Value>10063</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T15:00:00Z</TimeStamp>
      <Value>9068</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T14:00:00Z</TimeStamp>
      <Value>9353</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T04:00:00Z</TimeStamp>
      <Value>9513</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T02:00:00Z</TimeStamp>
      <Value>9377</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T08:00:00Z</TimeStamp>
      <Value>9579</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T20:00:00Z</TimeStamp>
      <Value>9109</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T09:00:00Z</TimeStamp>
      <Value>10631</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T06:00:00Z</TimeStamp>
      <Value>9587</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T01:00:00Z</TimeStamp>
      <Value>9108</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T16:00:00Z</TimeStamp>
      <Value>9454</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T21:00:00Z</TimeStamp>
      <Value>9285</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T19:00:00Z</TimeStamp>
      <Value>9059</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T00:00:00Z</TimeStamp>
      <Value>9470</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T05:00:00Z</TimeStamp>
      <Value>11830</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T13:00:00Z</TimeStamp>
      <Value>9992</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T17:00:00Z</TimeStamp>
      <Value>9529</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T18:00:00Z</TimeStamp>
      <Value>9203</Value>
    </UsageData>
    <UsageData>
      <TimeStamp>2015-11-28T11:00:00Z</TimeStamp>
      <Value>9604</Value>
    </UsageData>
  </PvDataInterval>
  <StartTime>2015-11-28</StartTime>
</DescribeDomainPvDataResponse>

展开
收起
青衫无名 2017-10-24 11:13:46 3887 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载