8.1.12.3. Query download status

No dediated REST API is required for download status retrieval, instead users can get the download status by proactively fetching scan result (8.1.3.2.2. Polling mechanism), or via callback response with webhook (8.1.3.2.1. Webhook mechanism).

The download status in JSON format will be appended into overall JSON scan report.

"download_info":
{
"error_detail": "<string>",
"status": "<string>",
"progress": <number>,
"url": "<string>"
}

For example:

"data_id": "abe53cbde03f4f448b378d3c6509e112",
"dlp_info": {
},
"download_info": {
"status": "Download Success",
"url": "https://secure.eicar.org/eicar.com"
},
"extraction_info": {
},
"file_info": {
"display_name": "eicar test",
"file_size": 68,
"file_type": "application/octet-stream",
"file_type_description": "EICAR virus test files",
"is_skip_hash": false,
"md5": "44d88612fea8a8f36de82e1278abb02f",
"sha1": "3395856ce81f2b7382dee72602f798b642f14140",
"sha256": "275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f",
"type_category": [
"O"
],
"upload_timestamp": "2020-10-12T19:49:12.680Z"
},
"process_info": {
"blocked_reason": "Infected",
"blocked_reasons": [
"Infected"
],
"file_type_skipped_scan": false,
"post_processing": {
"actions_failed": "",
"actions_ran": "",
"converted_destination": "",
"converted_to": "",
"copy_move_destination": ""
},
"processing_time": 99,
"processing_time_details": {
"av_scan_time": 69,
"others_time": 30,
"vul_time": 0
},
"profile": "File process",
"progress_percentage": 100,
"queue_time": 17,
"result": "Blocked",
"user_agent": "",
"username": "",
"verdicts": [
"Infected"
]
},
"scan_results": {
"data_id": "abe53cbde03f4f448b378d3c6509e112",
"progress_percentage": 100,
"scan_all_result_a": "Infected",
"scan_all_result_i": 1,
"scan_details": {
"Ahnlab": {
"def_time": "2020-10-12T17:24:00.000Z",
"eng_id": "ahnlab_1_windows",
"location": "local",
"scan_result_i": 1,
"scan_time": 7,
"threat_found": "Virus/EICAR_Test_File",
"wait_time": 3
},
"Avira": {
"def_time": "2020-10-12T00:00:00.000Z",
"eng_id": "avira_1_windows",
"location": "local",
"scan_result_i": 1,
"scan_time": 0,
"threat_found": "Eicar-Test-Signature",
"wait_time": 4
},
"ClamAV": {
"def_time": "2020-10-11T13:58:00.000Z",
"eng_id": "clamav_1_windows",
"location": "local",
"scan_result_i": 1,
"scan_time": 69,
"threat_found": "Win.Test.EICAR_HDB-1",
"wait_time": 3
},
"ESET": {
"def_time": "2020-10-12T00:00:00.000Z",
"eng_id": "eset_1_windows",
"location": "local",
"scan_result_i": 1,
"scan_time": 2,
"threat_found": "Eicar test file",
"wait_time": 4
}
},
"start_time": "2020-10-12T19:49:12.697Z",
"total_avs": 4,
"total_time": 99
},
"vulnerability_info": {
"verdict": 0
},
"yara_info": {
}
}
  • "status": indicates download status, which could be either "Download Success", "Downloading", "Download Cancelled", "Download Failed", " Download Timeout".

  • "progress": only applicable when "status" is "Downloading", indicates download finished percentage, in a range of [1, 99].

    • Once hitting 100, the status will be changed to "Download Success".

    • or other problematic status ("Download Cancelled", "Download Failed") if the download stopped unexpectedly.

  • "error_detail": revealed detailed reason why the download failed.

  • "url": original download link which was specified in HTTP(S) request's downloadfrom header

Download in progress

 

 

"status" = "Downloading"

  • Check "progress" key value for actual download percentage

  • For example:

"download_info":
{
"progress": 7,
"status": "Downloading",
"url": "http://192.168.200.97:8080/5gb.zip"
}

Download successful

 

 

"status" = "Download Success"

  • For example:

"download_info":
{
"status": "Download Success",
"url": "https://secure.eicar.org/eicar.com"
}

Download failed

 

 

"status" = "Download Failed"

  • Check "error_detail" key value for an error explanation

  • For example:

"download_info":
{
"error_detail": "Connection error",
"status": "Download Failed",
"url": "http://192.168.200.97:8080/2gb.zip"
}

Download timed out

 

"status" = "Download Timeout"

  • Expecting to occur when the download progress takes longer than what time window allowed in MetaDefender Core's pre-configured setting under workflow rule (under "SCAN" tab)

  • For example:

"download_info":
{
"status": "Download Timeout",
"url": "http://192.168.200.97:8080/2gb.zip"
}

Download cancelled

 

 

"status" = "Download cancelled"

  • Expecting to occur when user explicitly cancelled that file scan request, or batch request that the scan belongs to

  • For example:

"download_info":
{
"status": "Download Cancelled",
"url": "http://192.168.200.97:8080/5gb.zip"
}