Baidu AI Cloud
中国站

百度智能云

CDN

Statistical Interface (new version)

These interfaces are described in detail in the documentation Statistics Interface.

The api.QueryCondition structure contains basic query conditions as follows:

Parameter Type Description
StartTime string Start time of the time range queried, the default is 24 hours ahead of the endTime. The format is UTC time string, such as: “2019-09-01T07:12:00Z ".
EndTime string End value of the time range queried, the default is the current time. The time span is up to 90 days, and the time format is the same as StartTime.
Period int Granularity of the queried result, in seconds, you can select 60, 300, 3,600 and 86,400; the default is 300, and uv is 3,600 by default. When the time granularity is 60 s, recommend selecting 0.5 to 1h for the interval between startTime and endTime, otherwise it may not return normally because data are too massive.
KeyType int Identify the key content, 0=> domain name, 1=>username id, 2=>tag, 0 by default
Key []string Domain name, user Id or Tag.
GroupBy string Return result aggregation granularity, key => the final key is ‘total’ according to key aggregation, empty => return the overall result. Each time period of each key corresponds to a set of data.

metric means the type of statistical data to be queried as follows. You can see the format of specific results returned by the interface in the corresponding function.

metric Function Interface type Additional parameters
avg_speed GetAvgSpeed Query average rate None
avg_speed_region GetAvgSpeedByRegion Average rate of client access distribution queries prov and isp prov is the full spelling of the province to be queried, and it is empty by default. Query national data. isp is the ISP code to be queried, and it is empty by default. Query all ISP data.
pv GetPv pv/qps query level, query edge node or central node pv. You can fill in “all”, “edge” or “internal”, and the default is “all”.
pv_src GetSrcPv Query origin pv/qps None
pv_region GetPvByRegion Query pv/qps (access distribution by client) prov and isp prov is the full spelling of the province to be queried, and it is empty by default. Query national data. isp is the ISP code to be queried, and it is empty by default. Query all ISP data.
uv GetUv uv query None
flow GetFlow Query traffic and bandwidth level, query edge node or central node bandwidth. You can fill in “all”, “edge” or “internal”, and the default is “all”.
flow_protocol GetFlowByProtocol Query traffic and bandwidth ( by protocol) protocol, query http or https traffic and bandwidth. The value is “http”, “https” or “all”, and the default is “all”.
flow_region GetFlowByRegion Query traffic and bandwidth (access distribution by client) prov and isp prov is the full spelling of the province to be queried, and it is empty by default. Query national data. isp is the ISP code to be queried, and it is empty by default. Query all ISP data.
src_flow GetSrcFlow Query origin traffic and bandwidth None
real_hit GetRealHit Query the byte hit rate None
pv_hit GetPvHit Query of request hit rate None
httpcode GetHttpCode Statistical query of status code None
src_httpcode GetSrcHttpCode Query origin status codes None
httpcode_region GetHttpCodeByRegion Query status code statistics (access distribution by client) prov and isp prov is the full spelling of the province to be queried, and it is empty by default. Query national data. isp is the ISP code to be queried, and it is empty by default. Query all ISP data.
top_urls GetTopNUrls TopN urls extra, query the record of the specified http status code, and the default value is: "".
top_referers GetTopNReferers TopN referers extra, query the record of the specified http status code, and the default value is: "".
top_domains GetTopNDomains TopN domains extra, query the record of the specified http status code, and the default value is: "".
error GetError Query statistics of cdn error code classifications None
Previous
Dynamic Acceleration Interface
Next
Log Interface