# Obtain domain bandwidth data by province and operator [New] - GetUcdnProIspBandwidthV2

## Overview

Obtain domain bandwidth data by province and operator






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `GetUcdnProIspBandwidthV2`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.dezai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **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](/docs/api/summary/get_project_list). |No|
| **BeginTime** | int | The start date of the query, in Unix Timestamp format. |**Yes**|
| **EndTime** | int | The end date of the query, in Unix Timestamp format. |**Yes**|
| **Type** | int | Time Granularity<br />0 (By 5-minute granularity)<br />1 (By hour granularity)<br />2 (By day granularity)<br />3 (By minute granularity) |**Yes**|
| **DomainId.N** | string | Domain ID, the ID generated when creating a domain. Default to all domains. |No|
| **Province.N** | string | Province code (province pinyin), multiple can be passed, if not passed, all provinces will be queried. |No|
| **Isp** | string | Carrier code (carrier pinyin), only one carrier can be queried at a time, if not passed, all carriers will be taken by default. |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|
| **BandwidthSet** | array[[*ProIspBandwidthSet*](#proispbandwidthset)] | Bandwidth traffic instance table by province. Refer to the following BandwidthSet. |**Yes**|
| **RadixCn** | int | cn traffic radix, values ​​are 1000 or 1024<br /> |No|
| **RadixAbroad** | int | abroad traffic radix, values ​​are 1000 or 1024<br /> |No|

#### Data Model


#### ProIspBandwidthSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Province** | string | Province Code |**Yes**|
| **BandwidthTrafficList** | array[[*ProIspBandwidthList*](#proispbandwidthlist)] | Provincial Bandwidth Traffic Instance Table |**Yes**|

#### ProIspBandwidthList

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Time** | int | Time point for bandwidth acquisition. Format: Timestamp |No|
| **CdnBandwidth** | float | Returns the peak bandwidth of CDN within the specified time interval, unit Mbps |No|
| **Traffic** | float | Traffic corresponding to the time granularity, unit in bytes |No|

## Example

### Request Example
    
```
https://api.dezai.com/?Action=GetUcdnProIspBandwidthV2
&ProjectId=ZjPtoiWU
&BeginTime=4
&EndTime=9
&Type=6
&DomainId.n=SNEulleF
&Province.n=shanghai
&Isp=dianxin
```

### Response Example
    
```json
{
  "Action": "GetUcdnProIspBandwidthV2Response",
  "BandwidthSet": [
    {
      "BandwidthList": [
        {
          "CdnBandwidth": 3.79748,
          "Time": 5
        }
      ],
      "Province": "xIjRHOXf"
    }
  ],
  "RadixAbroad": 9,
  "RadixCn": 4,
  "RetCode": 0
}
```





