title | description | author | ms.localizationpriority | ms.subservice | doc_type |
---|---|---|---|---|---|
List hostPorts |
Get the list of hostPort resources associated with a host. |
angelo-moulic |
medium |
security |
apiPageType |
Namespace: microsoft.graph.security
[!INCLUDE beta-disclaimer]
[!INCLUDE threatintelligence-api-disclaimer]
Get the list of hostPort resources associated with a host.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
GET /security/threatIntelligence/hosts/{hostId}/ports
This method supports the $count
, $skip
, $top
, $select
, and $expand
OData query parameters to help customize the response. For general information, see OData query parameters.
The following properties can be used for $select
calls.
Property | Example | Notes |
---|---|---|
All hostPort properties | $select=id,firstSeenDateTime |
Use the name as it appears in the hostPort resource. |
mostRecentSslCertificate | $select=mostRecentSslCertificate |
You can't use $select on nested properties (for example, mostRecentSslCertificate/id ). |
host | $select=host |
You can't use $select on nested properties (for example, host/id ). |
The following properties can be used for $expand
calls.
Property | Example |
---|---|
mostRecentSslCertificate | $expand=mostRecentSslCertificate |
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns a 200 OK
response code and a collection of hostPort objects in the response body.
The following example shows a request.
GET https://graph.microsoft.com/beta/security/threatIntelligence/hosts/8.8.8.8/ports
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": [
{
"id": "tKhoxnUMGirrHqYiMpsdaQRDZKBnXrao",
"port": 443,
"firstSeenDateTime": "2016-12-06T20:23:38.00Z",
"lastSeenDateTime": "2023-07-18T23:24:01.00Z",
"lastScanDateTime": "2023-07-18T23:24:29.00Z",
"timesObserved": 15590,
"status": "open",
"protocol": "tcp",
"banners": [
{
"banner": "HTTP/1.1 302 Found\r\nX-Content-Type-Options:...",
"firstSeenDateTime": "2023-06-21T00:49:23.00Z",
"lastSeenDateTime": "2023-07-18T15:31:57.00Z",
"scanProtocol": "http_raw",
"timesObserved": 2
},
{
"banner": "HTTP/1.1 302 Found\r\nX-Content-Type-Options:...",
"firstSeenDateTime": "2021-03-12T15:38:42.00Z",
"lastSeenDateTime": "2023-07-18T15:22:16.00Z",
"scanProtocol": "http_raw",
"timesObserved": 2975
}
],
"services": [
{
"firstSeenDateTime": "2020-10-28T22:39:51.00Z",
"lastSeenDateTime": "2023-07-18T22:13:54.00Z",
"isRecent": true,
"component": {
"id": "EVfwHhqkUQESmqrKSFHobDUHDAKBsWLf",
"name": "scaffolding on HTTPServer2",
"version": "",
"category": "Server"
}
},
{
"firstSeenDateTime": "2022-06-26T04:29:25.00Z",
"lastSeenDateTime": "2023-07-18T00:54:13.00Z",
"isRecent": false,
"component": {
"id": "ZobhjJgOwebxpsXdCUjfTpshygqgcfJj",
"name": "nginx",
"version": "1.18.0",
"category": "Server"
}
}
],
"mostRecentSslCertificate": {
"id": "ZmI5NjU1MTUwNWYxZWRiMjRkZDNiMzZmY2ZmZGI3NjU4MzNiODExOA=="
},
"host": {
"id": "85.13.139.18"
}
}
]
}