Queries the data of page views (PVs) and unique visitors (UVs) of a domain name.
Usage note
- You can specify only one domain name in each query.
- You can query the data of the last 90 days at most.
- If you do not set the StartTime parameter or the EndTime parameter, the data of the last 24 hours is queried. If you set the StartTime and EndTime parameters, the data of the specified time range is queried.
QPS limit
A single user can perform a maximum of 100 queries per minute. Throttling is triggered when the number of calls per second exceeds the QPS limit. The throttling may affect your business. Thus, we recommend that you observe the QPS limit on this operation. For more information about what a single user means and the QPS details, see QPS limit on an API operation in ApsaraVideo Live.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeLiveDomainPvUvData |
The operation that you want to perform. Set the value to DescribeLiveDomainPvUvData. |
DomainName | String | Yes | example.com |
The streaming domain. |
StartTime | String | No | 2018-03-17T16:00:00Z |
The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
EndTime | String | No | 2018-03-20T16:00:00Z |
The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
StartTime | String | 2018-03-17T16:00:00Z |
The beginning of the time range in which data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
DataInterval | String | 3600 |
The time interval between the returned entries. Unit: seconds. Default value: 3600. |
DomainName | String | example.com |
The streaming domain |
EndTime | String | 2018-03-20T16:00:00Z |
The end of the time range in which data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
RequestId | String | E9D3257A-1B7C-414C-90C1-8D07AC47BCAC |
The ID of the request. |
PvUvDataInfos | Array of PvUvDataInfo |
The data of PVs and UVs. |
|
PvUvDataInfo | |||
PV | String | 3036 |
The data of PVs. |
TimeStamp | String | 2018-03-19T16:00:00Z |
The timestamp of the returned entry. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
UV | String | 2 |
The data of UVs. |
Examples
Sample requests
http://live.aliyuncs.com/?Action=DescribeLiveDomainPvUvData
&DomainName=example.com
&StartTime=2018-03-17T16:00:00Z
&EndTime=2018-03-20T16:00:00Z
&<Common request parameters>
Sample success responses
XML
format
<DescribeLiveDomainPvUvDataResponse>
<DataInterval>3600</DataInterval>
<RequestId>E9D3257A-1B7C-414C-90C1-8D07AC47BCAC</RequestId>
<DomainName>example.com</DomainName>
<EndTime>2018-03-20T16:00:00Z</EndTime>
<StartTime>2018-03-17T16:00:00Z</StartTime>
<PvUvDataInfos>
<PvUvDataInfo>
<TimeStamp>2018-03-19T16:00:00Z</TimeStamp>
<PV>3036</PV>
<UV>2</UV>
</PvUvDataInfo>
<PvUvDataInfo>
<TimeStamp>2018-03-18T16:00:00Z</TimeStamp>
<PV>3</PV>
<UV>2</UV>
</PvUvDataInfo>
<PvUvDataInfo>
<TimeStamp>2018-03-10T16:00:00Z</TimeStamp>
<PV>1</PV>
<UV>1</UV>
</PvUvDataInfo>
<PvUvDataInfo>
<TimeStamp>2018-03-11T16:00:00Z</TimeStamp>
<PV>1</PV>
<UV>1</UV>
</PvUvDataInfo>
<PvUvDataInfo>
<TimeStamp>2018-03-17T16:00:00Z</TimeStamp>
<PV>1</PV>
<UV>1</UV>
</PvUvDataInfo>
</PvUvDataInfos>
</DescribeLiveDomainPvUvDataResponse>
JSON
format
{
"DataInterval": "3600",
"RequestId": "E9D3257A-1B7C-414C-90C1-8D07AC47BCAC",
"DomainName": "example.com",
"EndTime": "2018-03-20T16:00:00Z",
"StartTime": "2018-03-17T16:00:00Z",
"PvUvDataInfos": {
"PvUvDataInfo": [{
"TimeStamp": "2018-03-19T16:00:00Z",
"PV": "3036",
"UV": "2"
}, {
"TimeStamp": "2018-03-18T16:00:00Z",
"PV": "3",
"UV": "2"
}, {
"TimeStamp": "2018-03-10T16:00:00Z",
"PV": "1",
"UV": "1"
}, {
"TimeStamp": "2018-03-11T16:00:00Z",
"PV": "1",
"UV": "1"
}, {
"TimeStamp": "2018-03-17T16:00:00Z",
"PV": "1",
"UV": "1"
}]
},
"RequestId": "E9D3257A-1B7C-414C-90C1-8D07AC47BCAC"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidStartTime.Malformed | Specified StartTime is malformed. | The error message returned because the format of the start time is invalid. Check whether the value of the StartTime parameter is valid. |
400 | InvalidEndTime.Malformed | Specified EndTime is malformed. | The error message returned because the format of the end time is invalid. Check whether the value of the EndTime parameter is valid. |
400 | InvalidTime.ValueNotSupported | Specified Time is malformed. | The error message returned because the time range specified by the StartTime and EndTime parameters is invalid. |
For a list of error codes, visit the API Error Center.
Special error codes
Error code |
Error message |
HTTP status code |
Description |
---|---|---|---|
Throttling |
Request was denied due to request throttling. |
503 |
The error message returned because the request was denied due to throttling. |
InvalidDomain.NotFound |
The domain provided does not belong to you. |
404 |
The error message returned because the domain name does not exist or does not belong to your Alibaba Cloud account. |
InvalidTime.ValueNotSupported |
Specified Time is malformed. |
400 |
The error message returned because the time range specified by the EndTime and StartTime parameters exceeds 90 days or the value of the EndTime parameter or the StartTime parameter is invalid. |