Query Interface for Querying the Byte Hit Rate
Last Updated:2020-09-17
Interface
This interface is used to query the byte hit rate.
| Method | Path | Description |
|---|---|---|
| GET | /v2/abroad/stat/realhit | Query byte hit rate |
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<HitRateDetails> | Data details |
HitRateDetails content
| Parameter | Type | Description |
|---|---|---|
| timestamp | Timestamp | Timing |
| hitrate | Double | Byte hit rate in the statistical period |
Request example
GET /v2/abroad/stat/realhit?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:45:00Z",
"key": "total",
"hitrate": 1
},
{
"timestamp": "2019-04-08T09:40:00Z",
"key": "total",
"hitrate": 1
}
]
}