mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-12 05:17:22 +00:00
2.2 KiB
2.2 KiB
title, description, keywords, search.product, ms.prod, ms.mktglfcycl, ms.sitesec, ms.pagetype, ms.author, author, ms.localizationpriority, manager, audience, ms.collection, ms.topic
title | description | keywords | search.product | ms.prod | ms.mktglfcycl | ms.sitesec | ms.pagetype | ms.author | author | ms.localizationpriority | manager | audience | ms.collection | ms.topic |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get file statistics API | Retrieves the prevalence for the given file. | apis, graph api, supported apis, get, file, statistics | eADQiWindows 10XVcnh | w10 | deploy | library | security | macapara | mjcaparas | medium | dansimp | ITPro | M365-security-compliance | article |
Get file statistics API
Applies to:
Retrieves the prevalence for the given file.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Use Microsoft Defender ATP APIs
Permission type | Permission | Permission display name |
---|---|---|
Application | File.Read.All | 'Read file profiles' |
Delegated (work or school account) | File.Read.All | 'Read file profiles' |
Note
When obtaining a token using user credentials:
- The user needs to have at least the following role permission: 'View Data' (See Create and manage roles for more information)
HTTP request
GET /api/files/{id}/stats
Request headers
Name | Type | Description |
---|---|---|
Authorization | String | Bearer {token}. Required. |
Request body
Empty
Response
If successful and file exists - 200 OK with statistical data in the body. If file do not exist - 404 Not Found.
Example
Request
Here is an example of the request.
[!includeImprove request performance]
GET https://api.securitycenter.windows.com/api/files/6532ec91d513acc05f43ee0aa3002599729fd3e1/stats
Response
Here is an example of the response.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://api.securitycenter.windows.com/api/$metadata#microsoft.windowsDefenderATP.api.InOrgFileStats",
"sha1": "6532ec91d513acc05f43ee0aa3002599729fd3e1",
"orgPrevalence": "3",
"orgFirstSeen": "2018-07-15T06:13:59Z",
"orgLastSeen": "2018-08-03T16:45:21Z",
"topFileNames": [
"chrome_1.exe",
"chrome_2.exe"
]
}