1.3. 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.

1.2. Initiate Process File

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*}

Method: GET

URL path

/file/{data_id}

REQUIRED

data_id

Returned from 1.2. 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:

Status: 200 (Should be 404)
{
"4f84e3b096d54908963d037b5457bf27": "Not Found"
}

When result is found:

It will return process result. Refer to 2. Response Description.