# Top N High-risk Vulnerabilities - VulStatisticTopN

## Overview

Top N number of hosts where a certain type of vulnerability exists






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `VulStatisticTopN`.                      | **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 |
|:---|:---|:---|:---|
| **ProjectId** | string | Project ID |**Yes**|
| **TopN** | int | The top N vulnerabilities with the most infected hosts, minimum is 10 |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|
| **Result** | array[[*VulStatisticTopNInfo*](#vulstatistictopninfo)] | Information of the top N vulnerabilities with the most infected hosts |**Yes**|

#### Data Model


#### VulStatisticTopNInfo

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **VulID** | string | Vulnerability ID |**Yes**|
| **Name** | string | Vulnerability Name |**Yes**|
| **AgentCount** | int | Number of hosts with this vulnerability |**Yes**|

## Example

### Request Example
    
```
https://api.sigcalcloud.com/?Action=VulStatisticTopN
&ProjectId=drlAkuki
&TopN=5
```

### Response Example
    
```json
{
  "Action": "VulStatisticTopNResponse",
  "Result": [
    {
      "AgentCount": 9,
      "Name": "PuWrejdm",
      "VulID": "DqGjSPJw"
    }
  ],
  "RetCode": 0
}
```





