Retrieving checksums through REST API
Available from 9.2.3. To retrieve information about checksums, you can use REST API that is generally used to retrieve raw scanned file data. This API retrieves information about scanned files, such as name, size, version, path, and so on. It can also return the values of the MD5 and SHA-256 columns, which show the checksums.
Before you begin
This topic is only an excerpt from the REST API call, intended to show specific examples that can be used to retrieve the MD5 and SHA-256 checksums. For more information, see REST API for retrieving raw scanned file data.
Sample columns
{
"scan_file_id": 3,
"computer_id": 5,
"path": "C:\BES\BESAirgapTool",
"name": "BESAirgapTool.exe",
"full_path_sha1": "9eb46086883dcbb6d2aefa2d6fd40bf8e736621b",
"size": 92174,
"version": null,
"md5": "8cb2289800b34ef1a5f472f7177348e2",
"sha256": "99e0c7c22c9ad735ec766914f0af17449a83681de22db7ce16672f16f37131bec0022371d4ace5d1854301e0",
"valid_from": "2015-07-31T07:03:21Z"
"valid_to": "9999-12-31T23:59:59Z"
}
Examples
- Example 1: Retrieving information only about name, computer name, path, MD5, and SHA-256 columns.
- Request:
https://hostname:port/api/sam/raw_file_facts?token=token &columns[]=name&columns[]=computer.name&columns[]=path&columns[]=md5&columns[]=sha256
- Example 2: Retrieving information about files with a specific MD5 checksum.
This example can be used to quickly find a corrupted checksum.
- Example 3: Retrieving information about name, computer name, path, and MD5 columns for all word.exe files that have a different MD5 checksum than the specified one.
This example can be used if you know that a file should have a specific checksum. You can therefore retrieve all files with other, corrupted checksums.