Retrieve process result by data_id
Description |
Query process result |
URL Path |
/file/{data_id} |
Method |
GET |
Summary
Query a previously submitted file's scanning result. Scan can be initiated the API below. Calling this API is required to retrieve scan results since the initiate API does not return results.
You can retrieve scan results using the Data ID. The scan is done asynchronously and each scan request is tracked by the ID. You need to use two separate API calls to initiate a file scan and retrieve the scan results. This request needs to be made multiple times until the scan is complete. You can trace the scan completion using the “scan_results.progress_percentage” value from the response.
Use the following URL to initiate the scan request: http://localhost:8008/metascan_rest/file
Use the following URL to retrieve scan results: http://localhost:8008/metascan_rest/file/{data_id*}
HTTP header parameters
apikey |
Only required if REST API keys have been defined |
OPTIONAL |
Method: GET
URL path |
/file/{data_id} |
REQUIRED |
data_id |
Returned from Initiate Process File |
REQUIRED |
Response Codes
200 |
OK |
Found the scan result for given data_id |
400 |
Bad request |
Not supported HTTP method or invalid HTTP request. |
401 |
Invalid API key |
Missing apikey header or invalid key passed |
404 |
Not Found |
Unable to find a scan result for the given data_id. This is an error. |
500 |
Internal Error |
Server temporary unavailable. Try again later. |
Response
Example of when result is not found :
{
"4f84e3b096d54908963d037b5457bf27"
:
"Not Found"
}
When result is found :
It will return process result. Refer to Response Description.