This URL gets the list of host ports.
Resource URL
GET /ntbamonitors/{ntbaId}/tophostports/<host_id>? TopN=<TopN> &timePeriod=<timePeriod>&startTime=<startTime>&endTime=<endTime>
Request Parameters
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| ntbaId | NTBA monitor id | Number | Yes |
| TopN | Number of top rows, default 50. | Number | No |
| timePeriod | Duration: can be
|
String | No |
| startTime | Start time in the format: yyyy-MM-dd HH:mm | String | No |
| endTime | End time in the format: yyyy-MM-dd HH:mm | String | No |
| Host_id | Host_id | String | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
| Field Name | Description | Data Type |
|---|---|---|
| hostports | List of ports | Array |
Details of applications:
| Field Name | Description | Data Type |
|---|---|---|
| port | Port | String |
| protocol | Protocol | Number |
| starttime | Start time | String |
| lastSeen | Last seen | String |
Example
Request
Response
{
"hostports":[{
"port":8888,
"protocol":”ftp”,
"starttime":"2013-08-27 16:44:06",
"lastseen":"2013-08-27 16:44:06"}
}]
}
Error Information
Following error codes are returned by this URL:
| S.No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
| 1 | 400 | 4301 | Invalid duration |
| 2 | 400 | 4302 | Invalid time format |
| 3 | 400 | 4303 | Start time is greater than end time |
| 4 | 400 | 4304 | Invalid date format |
| 5 | 400 | 4305 | Start/End date is not provided |
| 6 | 400 | 4306 | Invalid NTBA id |
| 7 | 400 | 4310 | Invalid host id or no data |