# Get High Defense Historical Statistics - DescribeNapHistoryStatistic

## Overview

Get High Defense Historical Statistics






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `DescribeNapHistoryStatistic`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.sigcalcloud.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 |
|:---|:---|:---|:---|
| **ResourceId** | string | Resource ID |**Yes**|
| **BeginTime** | int | Start Time, Unix Timestamp |**Yes**|
| **EndTime** | int | End time, Unix timestamp |**Yes**|
| **NapIP** | string | UDIP |No|
| **Offset** | int | List start position offset, default is 0 |No|
| **Limit** | int | Return data length, default is unlimited |No|
| **Accuracy** | int | Query granularity. 1. Minute granularity 2. Hourly granularity 3. Daily granularity Default is 2<br />1. Minute granularity, BeginTime start time is within 7 days, the time span of EndTime-BeginTime is up to 1 hour<br />2. Hourly granularity, BeginTime start time is within 30 days, the time span of EndTime-BeginTime is up to 7 days<br />3. Daily granularity, BeginTime start time is within 180 days, the time span of EndTime-BeginTime is up to 90 days |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|
| **NetStats** | array[[*NetStats*](#netstats)] | Statistical Data |**Yes**|

#### Data Model


#### NetStats

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Time** | int | Unix Timestamp |No|
| **Ingress** | [*NetStatEntry*](#netstatentry) | Inbound NetStatEntry |No|
| **Egress** | [*NetStatEntry*](#netstatentry) | Outbound NetStatEntry |No|
| **Drop** | [*NetStatEntry*](#netstatentry) | Discard NetStatEntry |No|

#### NetStatEntry

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Bps** | float | Traffic, unit: Mbits |No|
| **Pps** | int | Included volume, unit: pps |No|

## Example

### Request Example
    
```
https://api.sigcalcloud.com/?Action=DescribeNapHistoryStatistic
&ResourceId=usecure_ghp-sqyoxRVq
&BeginTime=1604160000
&EndTime=1606665600
&NapIP=10.5.12.3
&Accuracy=3
```

### Response Example
    
```json
{
  "Action": "DescribeNapHistoryStatisticResponse",
  "NetStats": [
    {
      "Drop": {
        "Bps": 0,
        "Pps": 0
      },
      "Egress": {
        "Bps": 1122,
        "Pps": 3
      },
      "Ingress": {
        "Bps": 1122,
        "Pps": 3
      },
      "Time": 1604160000
    },
    {
      "Drop": {
        "Bps": 0,
        "Pps": 0
      },
      "Egress": {
        "Bps": 3322,
        "Pps": 3
      },
      "Ingress": {
        "Bps": 3322,
        "Pps": 3
      },
      "Time": 1604246400
    }
  ],
  "RetCode": 0
}
```





