# Get DDoS Protection Real-time Statistics - DescribeNapRealTimeStatistic

## Overview

Get DDoS Protection Real-time Statistics






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `DescribeNapRealTimeStatistic`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.nubexcloud.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 (time span does not exceed 1 hour) |**Yes**|
| **NapIP** | string | UDIP |No|
| **Offset** | int | List start position offset, default is 0 |No|
| **Limit** | int | Return data length, default is unlimited |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.nubexcloud.com/?Action=DescribeNapRealTimeStatistic
&ResourceId=usecure_ghp-sqyoxRVq
&BeginTime=1607586971
&EndTime=1607590571
&NapIP=10.5.12.3
```

### Response Example
    
```json
{
  "Action": "DescribeNapRealTimeStatisticResponse",
  "NetStats": [
    {
      "Drop": {
        "Bps": 0,
        "Pps": 0
      },
      "Egress": {
        "Bps": 0,
        "Pps": 0
      },
      "Ingress": {
        "Bps": 1020.05,
        "Pps": 100010
      },
      "Time": 1607586960
    },
    {
      "Drop": {
        "Bps": 0,
        "Pps": 0
      },
      "Egress": {
        "Bps": 0,
        "Pps": 0
      },
      "Ingress": {
        "Bps": 20.12,
        "Pps": 2000
      },
      "Time": 1607587020
    }
  ],
  "RetCode": 0
}
```





