百度智能云

All Product Document

          CDN

          Uplink Traffic Peak

          This interface is used to query upstream peak traffic data

          Method Path Description
          POST /v2/stat/upload_peak?type=peak/95_peak/day_peak "peak" queries the total peak, “95_peak" queries the 95 peak, and “day_peak" queries the daily peak.

          Request body

          Parameter Optional Type Description
          startTime Optional Timestamp Start time of the time range queried, the default is 24 hours ahead of the endTime, UTC time.
          endTime Optional Timestamp End value of the time range queried, the default is the current time. UTC time.
          period Optional unsigned int Time granularity of the query, in seconds, the default value is 300s.
          domains Optional list<domain> List of domain names to be queried, when the list is empty, query data of all domain names of the user.
          level Optional string Specify to query global, edge data or central node data. "internal " means querying central node data, “edge" means querying edge node data, and “overall " means querying global data. The default is ““overall".
          dataType Optional string Data type specified to query by the dataType parameter. “all " means total data (dsa+static), “dsa " means dynamic data, and “static " means static data. The default value is "all ".

          Response body

          Parameter Optional Type Description
          details Required Data Query result
          count Required unsigned int The queried data number

          Data Type Description

          Parameter Optional Type Description
          flow Required unsigned int Traffic data
          bps Required unsigned int Bandwidth data
          pv Required unsigned int pv number
          time Required Timestamp Statistical data time of the corresponding data, with the format of UTC

          Request example - 95 peak data

          POST /v2/stat/upload_peak?type=95_peak 
          { 
              "startTime": "2020-02-05T00:00:00Z", 
              "endTime": "2020-02-06T03:00:00Z", 
              "level": "internal", 
              "period": 3600, 
              "domains": [] 
          } 

          Return example

          { 
              "count": 1, 
              "details": { 
                  { 
                      "flow": 10125043, 
                      "bps": 22500, 
                      "pv": 951084702, 
                      "time": "2020-02-05T04:00:00Z" 
                  } 
              } 
          } 
          Previous
          Domain Name Configuration Interface
          Next
          Statistical Interface (new version)