client.device_av_health¶
Access device antivirus health reporting.
Property¶
client.device_av_health
Methods¶
get_all(query: DeviceAVHealthQuery | None = None) -> DeviceAVHealthResults: fetch the JSON-backed AV health report.get_all_files() -> DeviceAVHealthResults: fetch the via-files AV health report.
Notes¶
- The export-backed path normalizes nested blob records into the same schema used by the JSON response.
DeviceAVHealthQuerykeeps Defender field names such asmachineId,computerDnsName, andavSignatureVersion.
API¶
DeviceAVHealthQuery
¶
Query parameters for the /api/deviceAvInfo endpoint.
DeviceAVHealthResults
¶
DeviceAVHealthResults(
endpoint: BaseEndpoint,
params: dict[str, str],
*,
path: str | None = None,
single: bool = False,
files: bool = False,
method: str = "GET",
request_kwargs: dict[str, Any] | None = None,
use_concurrent_skip_pagination: bool | None = None,
skip_page_size: int | None = None,
skip_max_concurrent: int | None = None,
)
Results from the /api/deviceAvInfo endpoint.
DeviceAVHealthEndpoint
¶
DeviceAVHealthEndpoint(http: Client, auth: MSALAuth)
Endpoint for /api/deviceAvInfo
get_all
¶
get_all(
query: DeviceAVHealthQuery | None = None,
) -> DeviceAVHealthResults
Get device AV health with optional filters.
Docs: - https://learn.microsoft.com/en-us/defender-endpoint/api/device-health-export-antivirus-health-report-api - https://learn.microsoft.com/en-us/defender-endpoint/api/device-health-export-antivirus-health-report-api#1-export-health-reporting-json-response
get_all_files
¶
get_all_files() -> DeviceAVHealthResults
Get device AV health report as a file.
Same Results as get_all but exported as a file instead of in the response body.
Recommended for larger data sets, as it returns zipped files with the data instead of returning it in the response body.
Docs: - https://learn.microsoft.com/en-us/defender-endpoint/api/device-health-export-antivirus-health-report-api - https://learn.microsoft.com/en-us/defender-endpoint/api/device-health-export-antivirus-health-report-api#2-export-health-reporting-via-files