百度智能云

All Product Document

          CDN Abroad

          PV, QPS Query Interface

          Interface

          This interface is used to query pv/qps.

          Method Path Description
          GET /v2/abroad/stat/pv Query domain name pv requests

          Request parameter

          Parameter Optional Type Description
          domain Optional String Domain name queried, if not specified, it returns the sum of traffic of all domain names of the user.
          endTime Optional Timestamp End value of the time range queried, the default is the current time. The maximum time span between endTime and startTime is 90 days.
          startTime Optional Timestamp Start time of the time range queried, the default is 24 hours ahead of the endTime.
          period Optional Int Granularity of the query result, in seconds, you can select 60, 300 and 3,600, and the default is 300.
          region Optional String Country queried

          Response parameter

          Parameter Type Description
          details list<PvDetails> Data details

          PvDetails content

          Parameter Type Description
          timestamp Timestamp Timing
          pv Int Number of requests in the statistical period
          qps Int Average qps in the statistical period

          Request example

          GET /v2/abroad/stat/pv?domain=xxx.com&startTime=2019-04-08T09:40:00Z&endTime=2019-04-08T10:00:00Z&period=300 

          Response example

          { 
              "status": "ok", 
              "details": [ 
                  { 
                      "timestamp": "2019-04-08T09:40:00Z", 
                      "key": "total", 
                      "pv": 1, 
                      "qps": 0 
                  }, 
                  { 
                      "timestamp": "2019-04-08T09:45:00Z", 
                      "key": "total", 
                      "pv": 7, 
                      "qps": 0 
                  }, 
                  { 
                      "timestamp": "2019-04-08T09:50:00Z" 
                  }, 
                  { 
                      "timestamp": "2019-04-08T09:55:00Z" 
                  } 
              ] 
          }
          Previous
          Monthly Traffic of the Overview Page
          Next
          Traffic Query Interface