Get Domain Hit Rate (New) - GetUcdnDomainHitRate
Overview
Get domain hit rate
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetUcdnDomainHitRate . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
Type | int | Time granularity (0 represents a 5-minute granularity, 1 represents a 1-hour granularity, 2 represents a daily granularity, 3 represents a 1-minute granularity) default is 5 minutes | Yes |
DomainId.N | string | Domain ID, the ID generated when creating a domain. Default to all domains. | No |
Areacode | string | The query bandwidth area 'cn' represents domestic, 'abroad' represents overseas, only supports domestic. | No |
BeginTime | int | The start time of the query, formatted as Unix Timestamp. If there is an EndTime, BeginTime must be assigned. If not assigned, a missing parameter error will be returned. If there is no EndTime, BeginTime can also be unassigned. The default EndTime is the current time, and the default BeginTime is the current time of the previous day. | No |
EndTime | int | The end time of the query, in Unix Timestamp format. EndTime defaults to the current time, and BeginTime defaults to the time one day before the current time. | No |
HitType | int | The default is 0 | No |
IsDcdn | boolean | Is acceleration enabled for the entire site, default is false | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
HitRateList | array[HitRateInfoV2] | Request number instance table. | No |
Data Model
HitRateInfoV2
Field Name | Type | Description Information | Required |
---|---|---|---|
Time | int | Time point for bandwidth acquisition. Format: Timestamp | No |
FlowHitRate | float | Total traffic hit rate, unit % | No |
RequestHitRate | float | Request hit rate, unit % | No |
Example
Request Example
https://api.surfercloud.com/?Action=GetUcdnDomainHitRate
&ProjectId=luMsAkgq
&Type=3
&DomainId.n=VNyehVPh
&Areacode=kFQcnVPx
&BeginTime=8
&EndTime=5
&HitType=8
&IsDcdn=true
Response Example
{
"Action": "GetUcdnDomainHitRateResponse",
"HitRateList": [
{
"EdgeFlowHitRate": 6.98827,
"EdgeRequestHitRate": 4.11524,
"FlowHitRate": 9.35869,
"RequestHitRate": 4.64549,
"Time": 5
}
],
"RetCode": 0
}