8.1.3.2.2.2. Archive file result (pagination fashion)

Request

Value

Method

GET

URL

/file/{data_id}?first={start_item}&size={number_of_items_next}

Request HTTP header parameters

name

type

required

value

rule

string

false

the name is the desired rule to query for (see 8.1.3.5. Fetching available processing rules)

apikey

string

false

User's session id, if 8.1.3.1. Process a file has API key sent, then API key is required for fetching

first

number

true

The first item order in the list child files of archive file

size

number

true

The number of items to be fetched next, counting from the item order indicated in first header

Successful response with archive detection

HTTP status code: 200

{
"data_id": "d7016058f0874d12b98a8c1ece9d3ea9",
"dlp_info": {...},
"extracted_files": {
"files_extracted_count": 2,
"files_in_archive": [
{
"data_id": "21d48f2c463c4ca89b7544c2c127e945",
"detected_by": 0,
"display_name": "samplezip.tar.gz/[Content]/samplezip/sampleimg.jpg",
"file_size": 215684,
"file_type": "image/jpeg",
"file_type_description": "JPEG image data",
"process_info": {
"blocked_reason": "",
"progress_percentage": 100,
"result": "Allowed"
},
"progress_percentage": 100,
"scan_all_result_a": "Whitelisted",
"scan_all_result_i": 7,
"scanned_with": 0
},
{
"data_id": "7cb298eb42614ca9bc87a4de4acad436",
"detected_by": 2,
"display_name": "samplezip.tar.gz/[Content]/samplezip/eicar",
"file_size": 69,
"file_type": "text/plain",
"file_type_description": "EICAR virus test files",
"process_info": {
"blocked_reason": "Infected",
"progress_percentage": 100,
"result": "Blocked"
},
"progress_percentage": 100,
"scan_all_result_a": "Infected",
"scan_all_result_i": 1,
"scanned_with": 2
},
],
"first_index": 0,
"page_size": 20,
"worst_data_id": "7cb298eb42614ca9bc87a4de4acad436"
},
"file_info": {
"display_name": "samplezip.tar.gz",
"file_size": 1486610,
"file_type": "application/x-gzip",
"file_type_description": "gzip compressed data",
"md5": "60d5fc5b07ecd1dcdc781bfa94ec8619",
"sha1": "992e40a2a6906c6d21f92034dfba779aae6d9ee7",
"sha256": "6ec5e258141528f004a43f7d25163a1c7486df76fde7976a793b140b11eda95d",
"upload_timestamp": "2015-08-14T12:46:59.360Z"
},
"scan_results": {
"last_file_scanned": "eicar",
"data_id": "d7016058f0874d12b98a8c1ece9d3ea9",
"progress_percentage": 100,
"scan_all_result_a": "Infected",
"scan_all_result_i": 1,
"scan_details": {
"Engine1": {
"def_time": "2015-08-13T09:32:48.000Z",
"eng_id": "engine1_1_linux",
"location": "local",
"scan_result_i": 0,
"scan_time": 1,
"wait_time": 3,
"threat_found": ""
},
"Engine2": {
"def_time": "2015-08-10T00:00:00.000Z",
"eng_id": "engine2_1_linux",
"location": "local",
"scan_result_i": 0,
"scan_time": 3,
"wait_time": 1,
"threat_found": ""
}
},
"start_time": "2015-08-14T12:46:59.363Z",
"total_avs": 2,
"total_time": 389
}
"process_info": {
"blocked_reason": "Infected",
"file_type_skipped_scan": false
"outdated_data": [
"enginedefinitions"
],
"post_processing": {
"actions_ran": "",
"actions_failed": "",
"converted_to": "",
"copy_move_destination": "",
"converted_destination": ""
},
"processing_time": 400,
"progress_percentage": 100,
"user_agent": "webscan",
"username: "LOCAL/admin",
"profile": "File scan",
"queue_time": 20,
"result": "Blocked",
},
"vulnerability_info": {...},
"yara_info":{...}
}

Completed response description with archive detection:

  • extracted_files: information about extracted files

    • files_extracted_count: the number of extracted files

    • files_in_archive: array of files in archive

      • detected_by: number of engines reported threat

      • scanned_with: number of engines used for scanning the file

    • first_index: it tells that from which file (index of the file, 0 is the first) the result JSON contains information about extracted files. (default=0)

    • page_size: it tells how many files the result JSON contains information about (default=20). So by default, the result JSON contains information about the first 20 extracted files.

    • worst_data_id: data id of the file that has the worst result in the archive

  • scan_results

    • last_file_scanned (stored only in memory, not in database): If available, the name of the most recent processed file

Please find complete scan result at 8.1.3.2.2. Polling mechanism

Response (not existing data_id)

HTTP status code: 200

{
"61dffeaa728844adbf49eb090e4ece0e": "Not Found"
}

Error response

Unexpected event on server

HTTP status code: 500

{
"err": "<error message>"
}

Note: Check Metadefender Core server logs for more information.