Get IP statistics API
Applies to:
- Microsoft Defender for Endpoint Plan 1
- Microsoft Defender for Endpoint Plan 2
- Microsoft 365 Defender
Want to experience Defender for Endpoint? Sign up for a free trial.
Note
If you are a US Government customer, please use the URIs listed in Microsoft Defender for Endpoint for US Government customers.
Tip
For better performance, you can use server closer to your geo location:
- api-us.securitycenter.microsoft.com
- api-eu.securitycenter.microsoft.com
- api-uk.securitycenter.microsoft.com
- api-au.securitycenter.microsoft.com
API description
Retrieves the statistics for the given IP.
Limitations
- Rate limitations for this API are 100 calls per minute and 1500 calls per hour.
- Maximum Value for Lookbackhours is 720 Hours(30days).
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Use Microsoft Defender for Endpoint APIs
Permission type | Permission | Permission display name |
---|---|---|
Application | Ip.Read.All | 'Read IP address profiles' |
Delegated (work or school account) | Ip.Read.All | 'Read IP address profiles' |
Note
When obtaining a token using user credentials:
- The user needs to have at least the following role permission: 'View Data' (For more information, see Create and manage roles)
HTTP request
GET /api/ips/{ip}/stats
Request headers
Name | Type | Description |
---|---|---|
Authorization | String | Bearer {token}. Required. |
Request URI parameters
Name | Type | Description |
---|---|---|
lookBackHours | Int32 | Defines the hours we search back to get the statistics. Defaults to 30 days. Optional. |
Request body
Empty
Response
If successful and ip exists - 200 OK with statistical data in the body. IP is valid but doesn't exist - organizationPrevalence 0, IP is invalid - HTTP 400.
Example
Request example
Here's an example of the request.
GET https://api.securitycenter.microsoft.com/api/ips/10.209.67.177/stats?lookBackHours=48
Response example
Here's an example of the response.
{
"@odata.context": "https://api.securitycenter.microsoft.com/api/$metadata#microsoft.windowsDefenderATP.api.InOrgIPStats",
"ipAddress": "10.209.67.177",
"organizationPrevalence": 63515,
"orgFirstSeen": "2017-07-30T13:36:06Z",
"orgLastSeen": "2017-08-29T13:32:59Z"
}
Name | Description |
---|---|
Organization prevalence | the distinct count of devices that opened network connection to this IP. |
Org first seen | the first connection for this IP in the organization. |
Org last seen | the last connection for this IP in the organization. |
Note
This statistic information is based on data from the past 30 days.
Tip
Do you want to learn more? Engage with the Microsoft Security community in our Tech Community: Microsoft Defender for Endpoint Tech Community.
Feedback
Submit and view feedback for