百度智能云

All Product Document

          CDN Abroad

          Status Code Statistics Query Interface

          Interface

          This interface is used to query the status code statistics.

          Method Path Description
          GET /v2/abroad/stat/httpcode Query status code statistics

          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 31 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.

          Response parameter

          Parameter Type Description
          details list<HttpCodeDetails> Data details

          HttpCodeData content

          Parameter Type Description
          timestamp Timestamp Timing
          counters list<KvCounter> HTTP status code counting

          KvCounter content

          Parameter Type Description
          name String Statistics
          count Int Statistics counting

          Request example

          GET /v2/abroad/stat/httpcode?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" 
                  }, 
                  { 
                      "timestamp": "2019-04-08T09:45:00Z" 
                  }, 
                  { 
                      "timestamp": "2019-04-08T09:50:00Z" 
                  }, 
                  { 
                      "timestamp": "2019-04-08T09:55:00Z" 
                  } 
              ] 
          }
          Previous
          Query Interface for Querying the Byte Hit Rate
          Next
          Cache Management Interface