This URL retrieves the top targets.
Resource URL
GET /alerts/TopN/targets
Request Parameters
URL Parameters: None
Payload Request Parameters: None
Query Parameters:
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| duration | Indicates the start time for the alerts. The default value is LAST_14_DAYS. Duration can be:
|
String | No |
Response Parameters
Following fields are returned.
| Field Name | Description | Data Type |
|---|---|---|
| TopTargetsList | List of top targets | Array |
Details of fields in TopTargetsList:
| Field Name | Description | Data Type |
|---|---|---|
| targetIP | Target's IP address | String |
| DNSName | Name of the DNS | String |
| attackCount | Count of the attack | Number |
Example
Request
GET https://<NSM_IP>/sdkapi/alerts/TopN/targets?duration=LAST_14_DAYS
Response
{
"TopTargetsList":[{"targetIP":"203.191.225.34","DNSName":"---","attackCount":36187},
{"targetIP":"192.168.3.2","DNSName":"---","attackCount":35780},{"targetIP":"203.191.225.54",
"DNSName":"---","attackCount":27252},{"targetIP":"203.191.225.56",
"DNSName":"---","attackCount":24170},{"targetIP":"203.191.225.50","DNSName":"---",
"attackCount":18491},{"targetIP":"1.1.1.10","DNSName":"---","attackCount":16578},
{"targetIP":"203.191.225.59","DNSName":"---","attackCount":15097},{"targetIP":"172.16.195.24",
"DNSName":"---","attackCount":14687},{"targetIP":"134.154.170.251","DNSName":"---",
"attackCount":14556},{"targetIP":"1.1.55.79","DNSName":"---","attackCount":13238}]
}
Error Information
Following error codes are returned by this URL:
| No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
| 1 | 500 | 1001 | Internal error |
| 2 | 400 | 3601 | Invalid duration |