Developer Guide
This is the API documentation for MetaDefender Cluster API Gateway Public API. If you would like to evaluate or have any questions about this documentation, please contact us via our Contact Us form.
How to Interact with MetaDefender Cluster API Gateway using REST API
MetaDefender Cluster API Gateway is used to submit files for analysis, retrieve scan results, manage file processing, download processed files, and manage file batches. OPSWAT recommends using the JSON-based REST API. The available methods are documented below.
Note: MetaDefender Cluster API doesn't support chunk upload, however is recommended to stream the files to MetaDefender Cluster API Gateway as part of the upload process.
File Analysis Process
MetaDefender Cluster is a system with multiple components that work together to utilize the power of multiple MetaDefender Core instances. The system is designed to handle large volumes of files and provide high throughput for file analysis. The system can be deployed in a distributed manner, allowing for horizontal scaling and load balancing across multiple MetaDefender Core instances.
Below is a brief description of the API integration flow:
Upload a file for analysis to MetaDefender Cluster API Gateway (
POST /file), which returns thedata_id: File Analysis.The following method can be used to retrieve the analysis report:
- Polling: Fetch the result with previously received data_id (
GET /file/{data_id}resource) until scan result belonging to data_id doesn't reach the 100 percent progress_percentage: (Fetch analysis result)
Note: Too many data_id requests can reduce performance. It is enough to just check every few hundred milliseconds.
- Polling: Fetch the result with previously received data_id (
Retrieve the analysis results anytime after the analysis is completed with hash for files (md5, sha1, sha256, sha512) by calling Fetch analysis result by hash.
- The hash can be found in the scan results
Retrieve processed file (sanitized, redacted, watermarked, etc.) after the analysis is complete.
Note: Based on the configured retention policy, the files might be available for retrieval at a later time.
OPSWAT provides some sample codes on GitHub to make it easier to understand how the MetaDefender REST API works.
Auth
Authentication APIs
User authentication is done via username & password.
Login
Initiate a new session. Required for using protected REST APIs.
| object | object | ||
| user | string | Username | |
| password | string | User's password |
OK
| object | object | ||
| oms | string | The randomly generated token used to prevent CSRF attacks | |
| session | string | The apikey used to make API calls which requires authentication |
Invalid credentials
Unexpected event on server.
Logout
Destroy session for not using protected REST APIs.
| apikey | string | Generated |
OK
| object | object | ||
| response | string |
Bad Request.
Invalid user information.
Unexpected event on server.
Analysis
File analysis APIs
Submit each file to MetaDefender Cluster API Gateway individually or group them in batches. Each file submission will return a data_id which will be the unique identifier used to retrieve the analysis results.
Note: MetaDefender API doesn't support chunk upload. You shouldn't load the file in memory, is recommended to stream the files to MetaDefender Cluster API Gateway as part of the upload process.
Analyze File (Asynchronous mode)
Scanning a file using a specified workflow. Scan is done asynchronously and each scan request is tracked by data id of which result can be retrieved by API Fetch Scan Result.
Note: Chunked transfer encoding (applying header Transfer-Encoding: Chunked) is not supported on
/fileAPI. API Gateway only accepts file uploads with a known content length and a content type ofapplication/octet-stream
| apikey | string | Generated | |
| filename | string | The name of the submitted file | |
| user | string | user_agent header used to identify (and limit) access to a particular rule. For rule selection, | |
| rule | string | Select rule for the analysis, if no header given the default rule will be selected (URL encoded UTF-8 string of rule name) | |
| batch | string | Batch id to scan with, coming from | |
| archivepwd | string | Password for archive ( URL encoded UTF-8 string) Multiple passwords is also supported, format: archivepwdX
For example:
| |
| content | string | Content encoding of the file. This header is used to specify the encoding of the file content. The value should be a valid content encoding type, such as "base64", "gzip". This header is optional and can be omitted if the encoding is not applicable. | |
| metadata | string | Could be utilized for:
It is strongly recommended to apply URL encoding before sending | |
| engines | string | Since MetaDefender Core 5.0.0, preferred context / verbose information can be sent to the engines. Please see the below pages for the details:
| |
| callbackurl | string | Client's URL where MetaDefender Cluster Callback Service will notify scan result back to whenever scan is finished (webhook model). * Format: protocol://<ip | domain>: * Example: http://10.0.1.100:8081/listenback * Supported protocol: HTTP / HTTPS * Supported host types: domain name, IPv4 (IPv6 not supported) * Method: POST
| |
| downloadfrom | string | Format: <protocol://><ip | domain>:<port></path> Scan a file from a download link, instead of uploading the file in the request body. MetaDefender Cluster Download Service downloads the file from the link, then sends it for scanning.
How it works:
Supported:
| |
| redirect | boolean | Use only with the Follow redirects of the download link.
Default: false | |
| skip | boolean | Use only with the Skip the HTTP
Default: false | |
| global | integer | This custom global timeout (in seconds) will override the global timeout predefined in corresponding workflow rule. | |
| client | string | The
|
| file | file |
Successful file submission
| object | object | ||
| data | string | Unique submission identifier. Use this value to reference the submission. |
Bad Request (e.g. header is invalid, apikey is missing or invalid, parameter value is invalid or
out of range, etc). The request is rejected before the file is processed, so no data_id is
created.
When the client-identity header is present but its value is invalid, err is one of:
err |
Cause |
|---|---|
Header 'client-identity' is empty |
The header was sent without a value. |
Header 'client-identity' must be less than or equal 4096 characters |
The header value is longer than 4096 characters. |
Header 'client-identity' contains non-printable character |
The value contains an ASCII control character, either directly or through an escape. |
Header 'client-identity' is not in JSON format |
The value could not be URL-decoded, is not valid JSON, or is not a JSON object. |
Header 'client-identity' does not contain a 'clients' key or empty 'clients' |
clients is missing, is not an array, or is an empty array. |
Header 'client-identity' contains an invalid data |
An entry of clients is not a JSON object. |
Header 'client-identity' does not contain required key '<key>' |
An entry is missing deployment_id, user_name, product_type or timestamp. |
Header 'client-identity' contains a non-string '<key>' |
deployment_id, user_name or product_type is not a string. |
Header 'client-identity' contains an empty '<key>' |
deployment_id, user_name or product_type is blank. |
Header 'client-identity' contains an invalid 'deployment_id' |
deployment_id holds anything other than letters and digits. |
Header 'client-identity' contains a non-integer 'timestamp' |
timestamp is not an integer. |
Header 'client-identity' contains a negative 'timestamp' |
timestamp is zero or negative. |
Every entry of clients is checked, not only the first one, and the first rule that fails is the
one reported.
Invalid user information or Not Allowed
Content-Length header is missing from the request.
Body input is empty.
Unexpected event on server.
Service is unavailable, err is one of:
Server is too busy. Try again later.Failed to request because no MetaDefender Cluster Download Service instance is available- thedownloadfromheader was given but no Download Service instance is healthy.
Fetch Analysis Result
Retrieve scan results.
Scan is done asynchronously and each scan request is tracked by a data ID.
Initiating file scans and retrieving the results need to be done using two separate API calls.
This request needs to be made multiple times until the scan is complete.
Scan completion can be traced using scan_results.progress_percentage value from the response.
Note: The REST API also supports pagination for archive file result. A 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, min=0)
- page_size: it tells how many files the result JSON contains information about (default=50, min=0, max=2000). So by default, the result JSON contains information about the first 50 extracted files.
- worst_data_id: data id of the file that has the worst result in the archive
- total_reused_files: Indicates how many extracted files reused results from a previous analysis instead of being processed again. This field is available starting with MetaDefender Cluster 2.10.0. A value of
0means no extracted files were reused. If the entire archive is reused,original_data_idis set andfiles_in_archiveis empty, while the archive totals are still included in the response.- fsv_output_files: information about the objects the File Structure Validation (FSV) engine extracted out of the file (available starting with MetaDefender Cluster 2.11.0). Absent when FSV dispatched no object.
- files_in_fsv_output: array of extracted objects, each with its own
data_id, plusobject_typeandobject_namedescribing the embedded object it came from- fsv_output_files_count: number of objects dispatched directly out of this file
- total_fsv_output_files: number of objects in the whole FSV output subtree of this file
- first_index / page_size: paged by the same
firstandsizeparameters asextracted_files; each list is paged independently- scan_results
- last_file_scanned (stored only in memory, not in database): If available, the name of the most recent processed file
| apikey | string | Generated | |
| user | string | user_agent header used to identify (and limit) access to a particular rule. For rule selection, |
| data | string | Unique submission identifier. Use this value to reference the submission. |
| first | integer | The minimum: 0 Default: 0 | |
| size | integer | The number of items to be fetched next, counting from the item order indicated in maximum: 2000 minimum: 0 Default: 50 |
Entire analysis report generated by MetaDefender Core
| object | object | ||
| data | string | data identifier of the requested file | |
| deflected | array[string] | Engines skipped (deflected) for this file based on the OPSWAT Alin AI Deflection verdict (available starting with MetaDefender Cluster 2.10.0). Returned only when at least one engine was deflected. Each item is an engine identifier, e.g. | |
| deflection | object | Report from the OPSWAT Alin AI Deflection engine (available starting with MetaDefender Cluster 2.10.0). Deflection produces an early verdict on a file that can be used to skip (deflect) other engines in the workflow. The object is empty when Deflection did not run on the file. | |
| final | object | Overall Deflection verdict and supporting details. | |
| verdict | string | Deflection engine verdict. Values:
Enum: | |
| confidence | integer | Confidence of the verdict, as a percentage (0-100). maximum: 100 minimum: 0 | |
| detail | object | Additional details about the analyzed file. | |
| data | string | data identifier of the analyzed file. | |
| file | string | Detected file type of the analyzed file. | |
| result | string | Hash of the result template used internally for Deflection rendering and coordination. | |
| err | integer | Returned only when Deflection failed to produce a verdict (
| |
| err | string | Returned only when Deflection failed. Human-readable reason of the failure. | |
| err | string | Returned only when Deflection failed and the engine reported a failure category. | |
| dlp | object | Full report from Proactive DLP | |
| certainty | string | Describes how certain the hit is, possible values:
Enum: | |
| errors | object | A list of error objects (empty if no errors happened), each error object contains following keys:
| |
| filename | string | Output processed file name (pre-configured on engine settings under Core's worflow rule) | |
| hits | object | Detailed results that contains as key the type of matched rule:
| |
| ccn | object | ||
| display | string | Credit Card Number, Social Security Number, or in case of RegEx, the name of the rule that has been given by the user | |
| hits | array[object] | A list of detections that matched this rule/pattern. | |
| after | string | The context after the matched data. | |
| before | string | The context before the matched data. | |
| certainty | string | The text version of "certainty_score", possible values:
Enum: | |
| certainty | integer | Is defined by the relevance of the given hit in its context. It is calculated based on multiple factors such as the number of digits, possible values: [0-100] | |
| hit | string | The matched data. | |
| location | string | The location of the hit that is found in a file. | |
| severity | integer | (NOTE: this field is deprecated): can be 0 (detected) or 1 (suspicious). Enum: | |
| tryRedact | boolean | If file was redacted or not. | |
| metadata | object | Result of metadata removal. | |
| result | string | Result of the metadata removal process, possible values:
Enum: | |
| redact | object | Result of redaction process. | |
| result | string | Result of the redaction process, possible values:
Enum: | |
| severity | integer | (NOTE: this field is deprecated): represents the severity of the data loss, possible values:
Enum: | |
| verdict | integer | The overall result for the scanned file. Possible values:
Enum: | |
| watermark | object | Result of watermarking process. | |
| result | string | Result of the watermarking process, possible values:
Enum: | |
| download | object | The downloading status. Only present when the file was submitted with the | |
| error | string | Revealed detailed reason why the download failed. Only present when the download did not succeed. | |
| progress | number | Only applicable when "status" is
| |
| downloaded | int64 | Only applicable when "status" is | |
| status | string | Indicates download status, which could be either
Enum: | |
| url | string | Original download link which was specified in HTTP(S) request's | |
| extraction | object | Details for archive extraction. | |
| decrypted | string | Indicate that decryption phase is successful or not. Enum: | |
| err | string | Error category | |
| err | integer | Error code | |
| err | string | Error message | |
| is | boolean | Indicate if file is password-protected or not. | |
| total | integer | Indicates how many extraction errors were reused from a previous analysis instead of being detected during the current analysis. This can include errors from the archive itself or from nested archives. A value of 0 means no extraction errors were reused. This field is available starting with MetaDefender Cluster 2.10.0. | |
| file | object | basic information of the scanned file | |
| display | string | The filename reported via | |
| file | integer | Total file size in bytes. | |
| file | string | The filetype using mimetype. | |
| file | string | The filetype in human readable format. | |
| md5 | string | File's MD5 hash. | |
| sha1 | string | File's SHA1 hash. | |
| sha256 | string | File's SHA256 Hash. | |
| sha512 | string | File's SHA512 Hash. | |
| signer | array[object] | Digital signature information of the scanned file. | |
| digest | string | Digest algorithm. | |
| digest | string | Encryption algorithm. | |
| issuer | string | Entity that develops and registers the certificate. | |
| serial | string | Serial number of the certificate. | |
| vendor | string | Entity that is issued a certificate and utilize it for creating a digital signature. | |
| version | string | Version of X.509 that is used in the certificate. This version field is zero-based.
| |
| type | array[string] | File type category.
Enum: | |
| receive | string | The timestamp when upload progress started (first byte received) (in milliseconds) | |
| upload | integer | Total time elapsed for upload process (in milliseconds). | |
| upload | string | The timestamp when upload progress finished (all bytes received) (in milliseconds) | |
| filestructurevalidation | object | Report from the File Structure Validation (FSV) engine (available starting with MetaDefender Cluster 2.11.0). FSV analyzes a file's internal structure, reports the embedded objects it detects, and produces its own verdict for the file. The objects it can extract are listed in the top-level | |
| final | object | Final verdict of the file structure validation. Omitted when | |
| verdict | string |
Enum: | |
| verdict | array[string] | Explanation of the final verdict. Only present when the engine supplied one. | |
| err | integer | Error or limit code, returned on a failure or an output-object limit and only then -
a determinate result carries
| |
| err | string | Category of the reported
Enum: | |
| err | string | Human readable description of the error or limit. Defaults to the action name matching | |
| process | object | Details reported by the engine about the analysis itself. Returned on both the determinate and the failure path whenever the engine produced any. The engine may add fields beyond those listed here. | |
| description | string | Summary of what the engine did with the file. | |
| skipped | string | Reason why validation actions were not applied to the detected objects. | |
| failure | string | Engine-supplied failure category, for example | |
| details | array[object] | Every embedded object FSV detected and analyzed, grouped by object kind. This is the full set of detected objects - it is a superset of | |
| action | string | Action FSV applied to the objects in this group, for example | |
| count | integer | Number of objects of this kind covered by the entry. It is a multiplicity and is not always | |
| object | string | Kind of the detected object. | |
| file | string | Path of the internal part the object was found in. Present for objects that map to a named part of the container. | |
| result | string | Outcome of | |
| object | array[string] | SHA256 of each object covered by the entry. | |
| object_details | Per-object details. Depending on the object kind an item is either the raw structural fragment as a string, or an object carrying the parsed details. | ||
| Raw structural fragment | string | The detected object as the engine found it in the container. | |
| binary | array[string] | The objects themselves, encoded as described by | |
| binary | string | Encoding applied to every entry of | |
| result | string | Hash of the result template used internally for rendering and engine/MetaDefender Core coordination. | |
| filetype | object | response information from FileType engine | |
| file | object | ||
| description | string | File type description | |
| detected | string | Analyzer that detected the file type | |
| encrypted | boolean | File is password-protected or not | |
| extensions | string | File type extension | |
| groupID | string | File type category | |
| groupIDs | array[string] | File type category.
Enum: | |
| group | string | File type category description | |
| likely | array[object] | A list of likely file type IDs | |
| score | integer | Likelihood score of the file type | |
| typeID | string | File type ID | |
| type | string | MIME type | |
| typeID | string | File type ID | |
| type | array[string] | A list of file type IDs | |
| final | object | Final verdict of the file type analysis. | |
| verdict | string | Final verdict of the file type analysis. Enum: | |
| verdict | string | Explanation of the final verdict. | |
| is | boolean | Indicates if the file type does not match the expected type. | |
| result | string | SHA256 Hash of user-interface template. For web console only. | |
| spoofing | object | Spoofing information. | |
| detection | string | Result of the spoofing detection. | |
| result | string | Explanation of the spoofing detection result. | |
| result | string | Overview of the spoofing detection result. | |
| fsv | object | Embedded objects the File Structure Validation (FSV) engine extracted from the file, each analyzed as a submission of its own (available starting with MetaDefender Cluster 2.11.0). Paged by the same | |
| first | integer | Index of the first listed object, i.e. the offset the page starts at (driven by the | |
| page | integer | The requested page size, i.e. the maximum number of objects listed (the | |
| fsv | integer | Number of output objects dispatched directly out of this file. It counts what was analyzed, not what was detected - an output-object limit caps it without marking the list as truncated. | |
| total | integer | Number of objects in the whole FSV output subtree of this file, i.e. including the objects extracted out of the extracted objects. | |
| files | array[object] | The page of extracted objects. | |
| data | string | data identifier of the extracted object. Use it to fetch the object's own analysis result. | |
| object | string | Kind of the embedded object FSV extracted, as reported by the engine (for example | |
| object | string | Name of the embedded object. Same value as | |
| display | string | Name the extracted object is analyzed under. | |
| file | integer | Size of the extracted object in bytes. | |
| file | string | MIME type of the extracted object. | |
| file | string | File type description of the extracted object. | |
| file | string | File type ID of the extracted object. | |
| type | array[string] | File type categories of the extracted object, using the same values as | |
| detected | integer | Number of engines that reported a threat in the extracted object. | |
| scanned | integer | Number of engines the extracted object was scanned with. | |
| progress | integer | Percentage of processing completed for the extracted object (from 1-100). | |
| scan | string | Processing result and its index
Enum: | |
| scan | integer | Scan result as index in the Processing Results table above Enum: | |
| files | integer | Number of files extracted out of this object, when the object is itself a container. Omitted otherwise. | |
| original | string | data identifier of the original analysis this result was reused from. Only present when the result was served from an earlier analysis. | |
| total | integer | Number of this object's children that were served from an earlier analysis. Omitted when nothing was reused. | |
| instance | string | Name of the MetaDefender Core instance that processed the object. | |
| process | object | Processing information of the extracted object. | |
| blocked | string | Provides the reason why the extracted object is blocked. Empty string unless | |
| blocked | array[string] | Provides the reasons why the extracted object is blocked, as an array. Empty array unless | |
| allowlisted | string | What allowlisted the object. Only present, together with | |
| blocklisted | string | What blocklisted the object. Only present, together with | |
| progress | integer | Percentage of processing completed (from 1-100). | |
| result | string | The final result of processing the extracted object (Allowed / Blocked / Processing). | |
| verdicts | array[string] | Aggregated list of potential issues. Empty array until processing completed. | |
| post | object | Contains information about result of sanitization process and any action done after finalizing the process using Post Actions. | |
| actions | string | Empty string if no action failed or list of failed actions, separated by "|". | |
| actions | string | List of successful actions, separated by "|". Empty string if otherwise. | |
| opswatfilescan | object | response information from OPSWAT Filescan engine | |
| original | string | The data ID of the previous analysis whose result was reused. This field is present only when the result was returned from an earlier analysis through the workflow rule's Reuse processing result option ( | |
| process | object | Processing information | |
| blocked | string | Provides the reason why the file is blocked (if so). | |
| blocked | array[string] | Provides the reason why the file is blocked in an array (if so). | |
| file | boolean | Indicates if the input file's detected type was configured to skip scanning. | |
| hash | integer | Total time elapsed for computing hashes (in milliseconds). | |
| outdated | array[string] | array of flags - if occur - describing outdated data in the result, these can be
Enum: | |
| processing | integer | Total time elapsed during processing file (in milliseconds). | |
| processing | object | Processing time on each major workflow processing step. | |
| av | integer | AV engines' processing time. | |
| cdr | integer | Deep CDR engine's sanitization time. | |
| dlp | integer | Proactive DLP engine's processing time. | |
| extraction | integer | Archive extraction engine's processing time. | |
| filetype | integer | FileType engine's processing time. | |
| fsv | integer | File Structure Validation engine's processing time. | |
| opswatfilescan | integer | OPSWAT Filescan engine's processing time. | |
| others | integer | Total time elapsed for following processing tasks in the product (in milliseconds):
| |
| parse | integer | Digital signature analyzing time. | |
| vul | integer | Vulnerability engine's lookup time. | |
| yara | integer | YARA engine's processing time. | |
| filetype | integer | FileType engine's wait time. | |
| fsv | integer | File Structure Validation engine's wait time. | |
| profile | string | The used rule name. | |
| progress | integer | Percentage of processing completed (from 1-100). | |
| queue | integer | Total time elapsed for file processing task was waiting in MetaDefender Core’s queue until being picked up (queue_time = start_time - upload_timestamp) (in milliseconds). | |
| result | string | The final result of processing the file (Allowed / Blocked / Processing). | |
| user | string | Identifier for the REST Client that calls the API. | |
| username | string | User identifier who submitted scan request earlier. | |
| verdicts | array[string] | Aggregated list of potential issues. | |
| post | object | Contains information about result of sanitization process and any action done after finalizing the process using Post Actions. | |
| actions | string | Empty string if no action failed or list of failed actions, separated by "|". | |
| actions | string | List of successful actions, separated by "|". Empty string if otherwise. | |
| converted | string | Contains the name of the sanitized file. | |
| converted | string | Contains target type name of sanitization. | |
| copy | string | Contains target type name of sanitization. | |
| sanitization | object | Deep CDR module returns forensic info to describe what happened during the process in the case file was successfully sanitized. | |
| cdr | integer | The time in milliseconds that the CDR process took to complete. | |
| description | string | Action was successful or not. | |
| details | array[object] | List of all sanitized objects | |
| action | string | The type of action that was performed Enum: | |
| count | integer | The number of objects that were sanitized/removed. | |
| details | object | List of all sanitized objects of a sanitized embedded file | |
| action | string | The type of action that was performed Enum: | |
| count | integer | The number of objects that were sanitized/removed. | |
| object | array[string] | Additional information about the sanitized object | |
| object | string | The object type that was sanitized/removed. | |
| description | string | Action was successful or not. | |
| file | string | If an embedded file was sanitized. | |
| object | array[string] | Additional information about the sanitized object | |
| object | string | The object type that was sanitized/removed. | |
| failure | string | Deep CDR errors are classified into different categories. For more details, please find Troubleshooting sanitization failures | |
| result | string | The result of the CDR process.
Enum: | |
| result | string | The hash value of the result template, which is used for displaying results on the Core UI and for internal communication between MetaDefender Core and the Deep CDR engine. This value is intended for system use only and is not required for external integration. | |
| sanitized | object | Information of sanitized file. Only applicable to individual file sanitization, or original archive document sanitization level. | |
| file | integer | Size of sanitized file in bytes. | |
| sha256 | string | SHA256 hash of sanitized file. | |
| verdict | string | The verdict of the CDR process.
Enum: | |
| verdict | array[string] | The explanations for the verdict of the CDR process. | |
| client | object | The | |
| clients | array[object] | Array of client identity objects. | |
| deployment | string | Unique identifier for the deployment. | |
| user | string | Name of the user or system that initiated the scan. | |
| product | string | Type of product or system that is performing the scan. | |
| version | string | Version of the product or system. | |
| host | string | Hostname or IP address of the client machine. | |
| timestamp | integer | Timestamp of when the scan was initiated, in milliseconds since epoch. | |
| scan | object | Result of the scanning process. | |
| data | string | Data ID of the requested file | |
| progress | integer | Track analysis progress until reaches 100. | |
| scan | string | Processing result and its index
Enum: | |
| scan | integer | Scan result as index in the Processing Results table above Enum: | |
| start | string | Timestamp when the scanning process starts. | |
| total | integer | Total number of scanning engines used as part of this analysis. | |
| total | integer | Total time elapsed during scan (in milliseconds). | |
| scan | object | Scan results for each antivirus engine. The key is the name of the antivirus engine and the value is the result of the antivirus engine | |
| ClamAV | object | Scan report per each engine. | |
| def | string | The database definition time for this engine | |
| eng | string | The unique identification string for the engine | |
| location | string | Where this engine is deployed (local/remote). | |
| scan | integer | Scan result as index in the Processing Results table | |
| scan | integer | The time elapsed during scan with this engine (in milliseconds). | |
| threat | string | The threat name, IF scan result is Infected or Suspicious. Otherwise empty string or error message from the engine. | |
| wait | integer | Time elapsed between sending file to Core and receiving the result from the engine (in milliseconds). | |
| vulnerability | object | Contains all vulnerability information of the analysis result | |
| result | object | The result information provided by the OESIS Framework | |
| code | integer | The result code for vulnerability check, 0 means a successful check | |
| hash | string | The file's SHA1 hash value | |
| method | integer | The method used by OESIS Framework, it should be 50700 every time. Enum: | |
| timestamp | string | Timestamp of the request issued | |
| timing | integer | The vulnerability check's duration in milliseconds | |
| detected | object | Detected products object is present if input hash has been found to correspond to verified product | |
| has | boolean | Indicates whether any KBs or MSBs exist for this hash | |
| has | boolean | Indicates whether any vulnerabilities have been associated with the particular product | |
| is | boolean | True if this product's patch level is current, defaults to true | |
| product | object | Product data object | |
| id | integer | The OPSWAT product id | |
| name | string | The product name | |
| remediation | string | A link where product updates or patches can be obtained | |
| severity | string | String description of Severity level:
Enum: | |
| sig | string | Product signature descriptor | |
| signature | integer | OPSWAT signature id | |
| vendor | object | Vendor data object | |
| id | integer | The OPSWAT vendor id | |
| name | string | The vendor name | |
| version | string | The installed product version | |
| version | object | Object containing detailed patch information | |
| count | integer | The number of patches behind of the installed product | |
| feed | integer | The remote feed ID used to determine patch level | |
| version | string | The current version of the product in the remote feed | |
| vulnerabilites | array[object] | A list of specific vulnerabilities | |
| description | string | A text description of the specific vulnerability | |
| details | object | A set of optional vulnerability details | |
| cpe | string | A CPE product reference | |
| cve | string | A CVE identification string | |
| cvss | object | A set of cvss severity information | |
| access | string | A CVSS access-complexity descriptor | |
| access | string | A CVSS access-vector descriptor | |
| authentication | string | A CVSS authentication descriptor | |
| availability | string | A CVSS availability impact descriptor | |
| confidentiality | string | A CVSS confidentiality impact descriptor | |
| generated | string | An epoch timestamp indicating CVSS generation time | |
| integrity | string | A CVSS integrity impact descriptor | |
| score | string | A CVSS 10-point severity score | |
| source | string | A CVSS source descriptor | |
| cwe | string | A CWE group identification string | |
| last | string | An epoch timestamp indicating source last update time | |
| published | string | An epoch timestamp indicating source publishing time | |
| references | array[string] | An array of external reference links | |
| severity | string | String description of Severity level:
Enum: | |
| severity | integer | A 5 point scale numerical description of Severity level with 5 being greatest and 0 being unknown | |
| static | integer | An OPSWAT identifier for the vulnerability | |
| verdict | integer | The vulnerability check's duration in milliseconds
| |
| yara | object | Information on data that matched YARA rules | |
| hits | object | detailed results that contains the name of the matched rules and a description for each. | |
| verdict | integer | The overall result for the analyzed file. Value will be one of the following: | index | status | |---------------|------------------------------| | 0 | Clean | | 1 | Found matched data | | 2 | Suspicious | | 3 | Failed | | 4 | Not scanned | Enum: |
Bad Request (e.g. header is invalid, apikey is missing or invalid, parameter value is invalid or out of range, etc).
The user has no rights for this operation.
Unexpected event on server.
Fetch Analysis Result By Hash
Retrieve analysis result by hash
| apikey | string | Generated | |
| rule | string | Select rule for the analysis, if no header given the default rule will be selected (URL encoded UTF-8 string of rule name) | |
| selfonly | boolean | Useful to archive hash lookup. Allow specifying to only perform hash lookup against the original archive file self only, and skip searching all child files result within the original archive. Default value is false. | |
| timerange | integer | Scoping down the recent number of hours that hash lookup task should start from till now, instead of searching the entire scan history in MetaDefender Cluster database. Default value is 0. That means no time scope. | |
| include | boolean | False (default): API will return "Not Found" if the verdict is in progress. True: If the queried hash has a completed processing result before, API will return the completed processing result. If this hash doesn't have any completed processing result, API will return this In-progress result. |
| md5|sha1|sha256|sha512 | string | Hash value to search. This can be md5, sha1, sha256, sha512 |
| first | integer | The minimum: 0 Default: 0 | |
| size | integer | The number of items to be fetched next, counting from the item order indicated in maximum: 2000 minimum: 0 Default: 50 |
Get information of file
| object | object | ||
| data | string | data identifier of the requested file | |
| deflected | array[string] | Engines skipped (deflected) for this file based on the OPSWAT Alin AI Deflection verdict (available starting with MetaDefender Cluster 2.10.0). Returned only when at least one engine was deflected. Each item is an engine identifier, e.g. | |
| deflection | object | Report from the OPSWAT Alin AI Deflection engine (available starting with MetaDefender Cluster 2.10.0). Deflection produces an early verdict on a file that can be used to skip (deflect) other engines in the workflow. The object is empty when Deflection did not run on the file. | |
| final | object | Overall Deflection verdict and supporting details. | |
| verdict | string | Deflection engine verdict. Values:
Enum: | |
| confidence | integer | Confidence of the verdict, as a percentage (0-100). maximum: 100 minimum: 0 | |
| detail | object | Additional details about the analyzed file. | |
| data | string | data identifier of the analyzed file. | |
| file | string | Detected file type of the analyzed file. | |
| result | string | Hash of the result template used internally for Deflection rendering and coordination. | |
| err | integer | Returned only when Deflection failed to produce a verdict (
| |
| err | string | Returned only when Deflection failed. Human-readable reason of the failure. | |
| err | string | Returned only when Deflection failed and the engine reported a failure category. | |
| dlp | object | Full report from Proactive DLP | |
| certainty | string | Describes how certain the hit is, possible values:
Enum: | |
| errors | object | A list of error objects (empty if no errors happened), each error object contains following keys:
| |
| filename | string | Output processed file name (pre-configured on engine settings under Core's worflow rule) | |
| hits | object | Detailed results that contains as key the type of matched rule:
| |
| ccn | object | ||
| display | string | Credit Card Number, Social Security Number, or in case of RegEx, the name of the rule that has been given by the user | |
| hits | array[object] | A list of detections that matched this rule/pattern. | |
| after | string | The context after the matched data. | |
| before | string | The context before the matched data. | |
| certainty | string | The text version of "certainty_score", possible values:
Enum: | |
| certainty | integer | Is defined by the relevance of the given hit in its context. It is calculated based on multiple factors such as the number of digits, possible values: [0-100] | |
| hit | string | The matched data. | |
| location | string | The location of the hit that is found in a file. | |
| severity | integer | (NOTE: this field is deprecated): can be 0 (detected) or 1 (suspicious). Enum: | |
| tryRedact | boolean | If file was redacted or not. | |
| metadata | object | Result of metadata removal. | |
| result | string | Result of the metadata removal process, possible values:
Enum: | |
| redact | object | Result of redaction process. | |
| result | string | Result of the redaction process, possible values:
Enum: | |
| severity | integer | (NOTE: this field is deprecated): represents the severity of the data loss, possible values:
Enum: | |
| verdict | integer | The overall result for the scanned file. Possible values:
Enum: | |
| watermark | object | Result of watermarking process. | |
| result | string | Result of the watermarking process, possible values:
Enum: | |
| download | object | The downloading status. Only present when the file was submitted with the | |
| error | string | Revealed detailed reason why the download failed. Only present when the download did not succeed. | |
| progress | number | Only applicable when "status" is
| |
| downloaded | int64 | Only applicable when "status" is | |
| status | string | Indicates download status, which could be either
Enum: | |
| url | string | Original download link which was specified in HTTP(S) request's | |
| extraction | object | Details for archive extraction. | |
| decrypted | string | Indicate that decryption phase is successful or not. Enum: | |
| err | string | Error category | |
| err | integer | Error code | |
| err | string | Error message | |
| is | boolean | Indicate if file is password-protected or not. | |
| total | integer | Indicates how many extraction errors were reused from a previous analysis instead of being detected during the current analysis. This can include errors from the archive itself or from nested archives. A value of 0 means no extraction errors were reused. This field is available starting with MetaDefender Cluster 2.10.0. | |
| file | object | basic information of the scanned file | |
| display | string | The filename reported via | |
| file | integer | Total file size in bytes. | |
| file | string | The filetype using mimetype. | |
| file | string | The filetype in human readable format. | |
| md5 | string | File's MD5 hash. | |
| sha1 | string | File's SHA1 hash. | |
| sha256 | string | File's SHA256 Hash. | |
| sha512 | string | File's SHA512 Hash. | |
| signer | array[object] | Digital signature information of the scanned file. | |
| digest | string | Digest algorithm. | |
| digest | string | Encryption algorithm. | |
| issuer | string | Entity that develops and registers the certificate. | |
| serial | string | Serial number of the certificate. | |
| vendor | string | Entity that is issued a certificate and utilize it for creating a digital signature. | |
| version | string | Version of X.509 that is used in the certificate. This version field is zero-based.
| |
| type | array[string] | File type category.
Enum: | |
| receive | string | The timestamp when upload progress started (first byte received) (in milliseconds) | |
| upload | integer | Total time elapsed for upload process (in milliseconds). | |
| upload | string | The timestamp when upload progress finished (all bytes received) (in milliseconds) | |
| filestructurevalidation | object | Report from the File Structure Validation (FSV) engine (available starting with MetaDefender Cluster 2.11.0). FSV analyzes a file's internal structure, reports the embedded objects it detects, and produces its own verdict for the file. The objects it can extract are listed in the top-level | |
| final | object | Final verdict of the file structure validation. Omitted when | |
| verdict | string |
Enum: | |
| verdict | array[string] | Explanation of the final verdict. Only present when the engine supplied one. | |
| err | integer | Error or limit code, returned on a failure or an output-object limit and only then -
a determinate result carries
| |
| err | string | Category of the reported
Enum: | |
| err | string | Human readable description of the error or limit. Defaults to the action name matching | |
| process | object | Details reported by the engine about the analysis itself. Returned on both the determinate and the failure path whenever the engine produced any. The engine may add fields beyond those listed here. | |
| description | string | Summary of what the engine did with the file. | |
| skipped | string | Reason why validation actions were not applied to the detected objects. | |
| failure | string | Engine-supplied failure category, for example | |
| details | array[object] | Every embedded object FSV detected and analyzed, grouped by object kind. This is the full set of detected objects - it is a superset of | |
| action | string | Action FSV applied to the objects in this group, for example | |
| count | integer | Number of objects of this kind covered by the entry. It is a multiplicity and is not always | |
| object | string | Kind of the detected object. | |
| file | string | Path of the internal part the object was found in. Present for objects that map to a named part of the container. | |
| result | string | Outcome of | |
| object | array[string] | SHA256 of each object covered by the entry. | |
| object_details | Per-object details. Depending on the object kind an item is either the raw structural fragment as a string, or an object carrying the parsed details. | ||
| Raw structural fragment | string | The detected object as the engine found it in the container. | |
| binary | array[string] | The objects themselves, encoded as described by | |
| binary | string | Encoding applied to every entry of | |
| result | string | Hash of the result template used internally for rendering and engine/MetaDefender Core coordination. | |
| filetype | object | response information from FileType engine | |
| file | object | ||
| description | string | File type description | |
| detected | string | Analyzer that detected the file type | |
| encrypted | boolean | File is password-protected or not | |
| extensions | string | File type extension | |
| groupID | string | File type category | |
| groupIDs | array[string] | File type category.
Enum: | |
| group | string | File type category description | |
| likely | array[object] | A list of likely file type IDs | |
| score | integer | Likelihood score of the file type | |
| typeID | string | File type ID | |
| type | string | MIME type | |
| typeID | string | File type ID | |
| type | array[string] | A list of file type IDs | |
| final | object | Final verdict of the file type analysis. | |
| verdict | string | Final verdict of the file type analysis. Enum: | |
| verdict | string | Explanation of the final verdict. | |
| is | boolean | Indicates if the file type does not match the expected type. | |
| result | string | SHA256 Hash of user-interface template. For web console only. | |
| spoofing | object | Spoofing information. | |
| detection | string | Result of the spoofing detection. | |
| result | string | Explanation of the spoofing detection result. | |
| result | string | Overview of the spoofing detection result. | |
| fsv | object | Embedded objects the File Structure Validation (FSV) engine extracted from the file, each analyzed as a submission of its own (available starting with MetaDefender Cluster 2.11.0). Paged by the same | |
| first | integer | Index of the first listed object, i.e. the offset the page starts at (driven by the | |
| page | integer | The requested page size, i.e. the maximum number of objects listed (the | |
| fsv | integer | Number of output objects dispatched directly out of this file. It counts what was analyzed, not what was detected - an output-object limit caps it without marking the list as truncated. | |
| total | integer | Number of objects in the whole FSV output subtree of this file, i.e. including the objects extracted out of the extracted objects. | |
| files | array[object] | The page of extracted objects. | |
| data | string | data identifier of the extracted object. Use it to fetch the object's own analysis result. | |
| object | string | Kind of the embedded object FSV extracted, as reported by the engine (for example | |
| object | string | Name of the embedded object. Same value as | |
| display | string | Name the extracted object is analyzed under. | |
| file | integer | Size of the extracted object in bytes. | |
| file | string | MIME type of the extracted object. | |
| file | string | File type description of the extracted object. | |
| file | string | File type ID of the extracted object. | |
| type | array[string] | File type categories of the extracted object, using the same values as | |
| detected | integer | Number of engines that reported a threat in the extracted object. | |
| scanned | integer | Number of engines the extracted object was scanned with. | |
| progress | integer | Percentage of processing completed for the extracted object (from 1-100). | |
| scan | string | Processing result and its index
Enum: | |
| scan | integer | Scan result as index in the Processing Results table above Enum: | |
| files | integer | Number of files extracted out of this object, when the object is itself a container. Omitted otherwise. | |
| original | string | data identifier of the original analysis this result was reused from. Only present when the result was served from an earlier analysis. | |
| total | integer | Number of this object's children that were served from an earlier analysis. Omitted when nothing was reused. | |
| instance | string | Name of the MetaDefender Core instance that processed the object. | |
| process | object | Processing information of the extracted object. | |
| blocked | string | Provides the reason why the extracted object is blocked. Empty string unless | |
| blocked | array[string] | Provides the reasons why the extracted object is blocked, as an array. Empty array unless | |
| allowlisted | string | What allowlisted the object. Only present, together with | |
| blocklisted | string | What blocklisted the object. Only present, together with | |
| progress | integer | Percentage of processing completed (from 1-100). | |
| result | string | The final result of processing the extracted object (Allowed / Blocked / Processing). | |
| verdicts | array[string] | Aggregated list of potential issues. Empty array until processing completed. | |
| post | object | Contains information about result of sanitization process and any action done after finalizing the process using Post Actions. | |
| actions | string | Empty string if no action failed or list of failed actions, separated by "|". | |
| actions | string | List of successful actions, separated by "|". Empty string if otherwise. | |
| opswatfilescan | object | response information from OPSWAT Filescan engine | |
| original | string | The data ID of the previous analysis whose result was reused. This field is present only when the result was returned from an earlier analysis through the workflow rule's Reuse processing result option ( | |
| process | object | Processing information | |
| blocked | string | Provides the reason why the file is blocked (if so). | |
| blocked | array[string] | Provides the reason why the file is blocked in an array (if so). | |
| file | boolean | Indicates if the input file's detected type was configured to skip scanning. | |
| hash | integer | Total time elapsed for computing hashes (in milliseconds). | |
| outdated | array[string] | array of flags - if occur - describing outdated data in the result, these can be
Enum: | |
| processing | integer | Total time elapsed during processing file (in milliseconds). | |
| processing | object | Processing time on each major workflow processing step. | |
| av | integer | AV engines' processing time. | |
| cdr | integer | Deep CDR engine's sanitization time. | |
| dlp | integer | Proactive DLP engine's processing time. | |
| extraction | integer | Archive extraction engine's processing time. | |
| filetype | integer | FileType engine's processing time. | |
| fsv | integer | File Structure Validation engine's processing time. | |
| opswatfilescan | integer | OPSWAT Filescan engine's processing time. | |
| others | integer | Total time elapsed for following processing tasks in the product (in milliseconds):
| |
| parse | integer | Digital signature analyzing time. | |
| vul | integer | Vulnerability engine's lookup time. | |
| yara | integer | YARA engine's processing time. | |
| filetype | integer | FileType engine's wait time. | |
| fsv | integer | File Structure Validation engine's wait time. | |
| profile | string | The used rule name. | |
| progress | integer | Percentage of processing completed (from 1-100). | |
| queue | integer | Total time elapsed for file processing task was waiting in MetaDefender Core’s queue until being picked up (queue_time = start_time - upload_timestamp) (in milliseconds). | |
| result | string | The final result of processing the file (Allowed / Blocked / Processing). | |
| user | string | Identifier for the REST Client that calls the API. | |
| username | string | User identifier who submitted scan request earlier. | |
| verdicts | array[string] | Aggregated list of potential issues. | |
| post | object | Contains information about result of sanitization process and any action done after finalizing the process using Post Actions. | |
| actions | string | Empty string if no action failed or list of failed actions, separated by "|". | |
| actions | string | List of successful actions, separated by "|". Empty string if otherwise. | |
| converted | string | Contains the name of the sanitized file. | |
| converted | string | Contains target type name of sanitization. | |
| copy | string | Contains target type name of sanitization. | |
| sanitization | object | Deep CDR module returns forensic info to describe what happened during the process in the case file was successfully sanitized. | |
| cdr | integer | The time in milliseconds that the CDR process took to complete. | |
| description | string | Action was successful or not. | |
| details | array[object] | List of all sanitized objects | |
| action | string | The type of action that was performed Enum: | |
| count | integer | The number of objects that were sanitized/removed. | |
| details | object | List of all sanitized objects of a sanitized embedded file | |
| action | string | The type of action that was performed Enum: | |
| count | integer | The number of objects that were sanitized/removed. | |
| object | array[string] | Additional information about the sanitized object | |
| object | string | The object type that was sanitized/removed. | |
| description | string | Action was successful or not. | |
| file | string | If an embedded file was sanitized. | |
| object | array[string] | Additional information about the sanitized object | |
| object | string | The object type that was sanitized/removed. | |
| failure | string | Deep CDR errors are classified into different categories. For more details, please find Troubleshooting sanitization failures | |
| result | string | The result of the CDR process.
Enum: | |
| result | string | The hash value of the result template, which is used for displaying results on the Core UI and for internal communication between MetaDefender Core and the Deep CDR engine. This value is intended for system use only and is not required for external integration. | |
| sanitized | object | Information of sanitized file. Only applicable to individual file sanitization, or original archive document sanitization level. | |
| file | integer | Size of sanitized file in bytes. | |
| sha256 | string | SHA256 hash of sanitized file. | |
| verdict | string | The verdict of the CDR process.
Enum: | |
| verdict | array[string] | The explanations for the verdict of the CDR process. | |
| client | object | The | |
| clients | array[object] | Array of client identity objects. | |
| deployment | string | Unique identifier for the deployment. | |
| user | string | Name of the user or system that initiated the scan. | |
| product | string | Type of product or system that is performing the scan. | |
| version | string | Version of the product or system. | |
| host | string | Hostname or IP address of the client machine. | |
| timestamp | integer | Timestamp of when the scan was initiated, in milliseconds since epoch. | |
| scan | object | Result of the scanning process. | |
| data | string | Data ID of the requested file | |
| progress | integer | Track analysis progress until reaches 100. | |
| scan | string | Processing result and its index
Enum: | |
| scan | integer | Scan result as index in the Processing Results table above Enum: | |
| start | string | Timestamp when the scanning process starts. | |
| total | integer | Total number of scanning engines used as part of this analysis. | |
| total | integer | Total time elapsed during scan (in milliseconds). | |
| scan | object | Scan results for each antivirus engine. The key is the name of the antivirus engine and the value is the result of the antivirus engine | |
| ClamAV | object | Scan report per each engine. | |
| def | string | The database definition time for this engine | |
| eng | string | The unique identification string for the engine | |
| location | string | Where this engine is deployed (local/remote). | |
| scan | integer | Scan result as index in the Processing Results table | |
| scan | integer | The time elapsed during scan with this engine (in milliseconds). | |
| threat | string | The threat name, IF scan result is Infected or Suspicious. Otherwise empty string or error message from the engine. | |
| wait | integer | Time elapsed between sending file to Core and receiving the result from the engine (in milliseconds). | |
| vulnerability | object | Contains all vulnerability information of the analysis result | |
| result | object | The result information provided by the OESIS Framework | |
| code | integer | The result code for vulnerability check, 0 means a successful check | |
| hash | string | The file's SHA1 hash value | |
| method | integer | The method used by OESIS Framework, it should be 50700 every time. Enum: | |
| timestamp | string | Timestamp of the request issued | |
| timing | integer | The vulnerability check's duration in milliseconds | |
| detected | object | Detected products object is present if input hash has been found to correspond to verified product | |
| has | boolean | Indicates whether any KBs or MSBs exist for this hash | |
| has | boolean | Indicates whether any vulnerabilities have been associated with the particular product | |
| is | boolean | True if this product's patch level is current, defaults to true | |
| product | object | Product data object | |
| id | integer | The OPSWAT product id | |
| name | string | The product name | |
| remediation | string | A link where product updates or patches can be obtained | |
| severity | string | String description of Severity level:
Enum: | |
| sig | string | Product signature descriptor | |
| signature | integer | OPSWAT signature id | |
| vendor | object | Vendor data object | |
| id | integer | The OPSWAT vendor id | |
| name | string | The vendor name | |
| version | string | The installed product version | |
| version | object | Object containing detailed patch information | |
| count | integer | The number of patches behind of the installed product | |
| feed | integer | The remote feed ID used to determine patch level | |
| version | string | The current version of the product in the remote feed | |
| vulnerabilites | array[object] | A list of specific vulnerabilities | |
| description | string | A text description of the specific vulnerability | |
| details | object | A set of optional vulnerability details | |
| cpe | string | A CPE product reference | |
| cve | string | A CVE identification string | |
| cvss | object | A set of cvss severity information | |
| access | string | A CVSS access-complexity descriptor | |
| access | string | A CVSS access-vector descriptor | |
| authentication | string | A CVSS authentication descriptor | |
| availability | string | A CVSS availability impact descriptor | |
| confidentiality | string | A CVSS confidentiality impact descriptor | |
| generated | string | An epoch timestamp indicating CVSS generation time | |
| integrity | string | A CVSS integrity impact descriptor | |
| score | string | A CVSS 10-point severity score | |
| source | string | A CVSS source descriptor | |
| cwe | string | A CWE group identification string | |
| last | string | An epoch timestamp indicating source last update time | |
| published | string | An epoch timestamp indicating source publishing time | |
| references | array[string] | An array of external reference links | |
| severity | string | String description of Severity level:
Enum: | |
| severity | integer | A 5 point scale numerical description of Severity level with 5 being greatest and 0 being unknown | |
| static | integer | An OPSWAT identifier for the vulnerability | |
| verdict | integer | The vulnerability check's duration in milliseconds
| |
| yara | object | Information on data that matched YARA rules | |
| hits | object | detailed results that contains the name of the matched rules and a description for each. | |
| verdict | integer | The overall result for the analyzed file. Value will be one of the following: | index | status | |---------------|------------------------------| | 0 | Clean | | 1 | Found matched data | | 2 | Suspicious | | 3 | Failed | | 4 | Not scanned | Enum: |
Invalid hash format
Retrieve blocked leaf files from an archive by hash
Returns the deepest blocked files found within an original archive, identified by the archive's hash value. A leaf file is a file that has no successfully extracted child files. If no blocked leaf files are found, the response returns an empty array. A maximum of 100 blocked leaf files is returned in a single request.
| apikey | string | Generated | |
| rule | string | Select rule for the analysis, if no header given the default rule will be selected (URL encoded UTF-8 string of rule name) | |
| timerange | integer | Limits the hash lookup to files analyzed within the specified number of hours. A value of |
| md5|sha1|sha256|sha512 | string | Hash value of the archive. Supported hash types are MD5, SHA-1, SHA-256, and SHA-512. |
Successfully retrieved the list of blocked leaf files.
| object | object | ||
| details | array[object] | List of blocked leaf files. | |
| blocked | array[string] | Reasons why the file was blocked. | |
| engines | array[object] | Detection results reported by individual engines. | |
| engine | string | Name of the scanning engine. | |
| threat | string | Threat detected by the engine. | |
| data | string | Unique identifier of the blocked leaf file. | |
| display | string | Name of the blocked leaf file. | |
| file | string | MIME type of the file. | |
| parent | string | Data identifier of the original archive. | |
| path | string | Full path of the blocked leaf file within the archive. | |
| process | object | Processing information. | |
| post | object | Details of post-processing actions. | |
| actions | string | Failed post-processing actions, separated by | |
| actions | string | Successful post-processing actions, separated by | |
| verdicts | array[string] | Aggregated verdicts for the blocked leaf file. | |
| yara | object | YARA scan results for the blocked leaf file. | |
| hits | array[string] | Matched YARA rules. | |
| limit | boolean | Indicates whether more than 100 blocked leaf files were found. | |
| total | integer | Number of blocked leaf files returned in the |
The timerange header value is invalid.
The specified hash was not found, or the file is still being processed.
The user has no rights for this operation.
Unexpected event on server.
Fetching Available Analysis Rules
Retrieve all available rules with their custom configurations. Fetching available processing rules.
| apikey | string | Generated
| |
| user | string | The user agent string value sent in the header (specified by the client). Only those rules are returned, that:
For details see KB article What are Security Policies and how do I use them?. |
Returns the list of available rules.
| array | array[object] | ||
| max | integer | The maximum allowed file size (in bytes) for this rule. | |
| name | string | A unique identifier for identify in the used rule for a scan.. | |
| global | object | The global timeout for the rule in seconds. If the rule takes longer than this time, it will be stopped. | |
| value | integer | The timeout value in seconds. | |
| enabled | boolean | Indicates whether the global timeout is enabled. |
Unexpected event on server.
Download Sanitized Files
Retrieve sanitized file based on the data_id
| apikey | string | Generated |
| data | string | The data_id comes from the result of |
Returns the sanitized content.
| file | file |
Requests resource was not found.
The user has no rights for this operation.
Unexpected event on server.
Download either sanitized files or DLP processed files
Retrieve sanitized file based on the data_id.
In case there's no sanitized file, and DLP processed file is available, user will retrieve DLP processed file.
| apikey | string | Generated |
| data | string | The data_id comes from the result of |
Returns the sanitized or DLP processed content.
| file | file |
File could not be found
The user has no rights for this operation.
Unexpected event on server.
Cancel File Analysis
When cancelling a file analysis, the connected analysis (e.g. files in an archive) that are still in progress will be cancelled also.
The cancelled analysis will be automatically closed.
When the file was submitted with the downloadfrom header and is still being downloaded, the download is stopped and download_info.status becomes Download Cancelled.
| apikey | string | Generated |
| data | string | Unique submission identifier. Use this value to reference the submission. |
Analysis was sucessfully cancelled.
| object | object |
Bad Request (e.g. header is invalid, apikey is missing or invalid, parameter value is invalid or out of range, etc).
Invalid user information or Not Allowed
Data ID not found (invalid id) or Requests resource was not found
The user has no rights for this operation.
Unexpected event on server.
Retrieve blocked leaf files from an archive
Returns the deepest blocked files found within an original archive, identified by the archive's data_id.
A leaf file is a file that has no successfully extracted child files.
If no blocked leaf files are found, the response returns an empty array.
A maximum of 100 blocked leaf files is returned in a single request.
| apikey | string | Generated |
| data | string | The |
Successfully retrieved the list of blocked leaf files.
| object | object | ||
| details | array[object] | List of blocked leaf files. | |
| blocked | array[string] | Reasons why the file was blocked. | |
| engines | array[object] | Detection results reported by individual engines. | |
| engine | string | Name of the scanning engine. | |
| threat | string | Threat detected by the engine. | |
| data | string | Unique identifier of the blocked leaf file. | |
| display | string | Name of the blocked leaf file. | |
| file | string | MIME type of the file. | |
| parent | string | Data identifier of the original archive. | |
| path | string | Full path of the blocked leaf file within the archive. | |
| process | object | Processing information. | |
| post | object | Details of post-processing actions. | |
| actions | string | Failed post-processing actions, separated by | |
| actions | string | Successful post-processing actions, separated by | |
| verdicts | array[string] | Aggregated verdicts for the blocked leaf file. | |
| yara | object | YARA scan results for the blocked leaf file. | |
| hits | array[string] | Matched YARA rules. | |
| limit | boolean | Indicates whether more than 100 blocked leaf files were found. | |
| total | integer | Number of blocked leaf files returned in the |
Requests resource was not found.
The user has no rights for this operation.
Unexpected event on server.
Fetch the Top 100 Extraction Errors in an Archive
Returns up to 100 extraction errors found while processing the archive identified by data_id, including errors from nested archives.
The response includes:
total: Number of archives (root and nested) that reported extraction errors.root_archive: Extraction error details for the top-level archive. Omitted if no root-level errors exist.nested_archives: Extraction error details for nested archives.
If no extraction errors are found:
totalis 0.nested_archivesmay be empty.root_archivemay be omitted.
If the archive result was reused from a previous analysis, the API returns the extraction errors from that analysis. You can identify this case when original_data_id is set in the GET /file/{data_id} response. The first segment of each archive_path is updated to use the name of the requested file. This behavior is available starting with MetaDefender Cluster 2.10.0.
| apikey | string | Generated |
| data | string | Data identifier of the original (root) archive file. |
Extraction error information for the specified archive.
| object | object | ||
| total | integer | Total count of archives (root and nested) that have extraction errors. | |
| root | object | Error details for the root archive (present only if the root archive has an error). | |
| err | string | High-level error category. | |
| err | string | Detailed diagnostic message. | |
| err | string | Human-readable description of the error. | |
| nested | array[object] | List of nested archives that encountered extraction errors. | |
| data | string | Data identifier of the nested archive. | |
| archive | array[string] | Ordered path segments from the root archive to this nested archive. | |
| err | string | High-level error category. | |
| err | string | Detailed diagnostic message. | |
| err | string | Human-readable description of the nested archive issue. |
Invalid request (e.g. malformed data_id or bad query parameters).
Requests resource was not found.
The user has no rights for this operation.
The file is still being processed; extraction errors not finalized yet.
Unexpected event on server.
Query webhook status
Prior to being notified when webhook mode is enabled, the client can request MetaDefender Cluster API Gateway for the file processing webhook status at any time.
| apikey | string | Generated |
| data | string | The |
Webhook status is fetched successfully.
| object | object | ||
| data | string | The file submission identifier | |
| request | string | A timestamp when the request has been made. | |
| status | integer | What was the returned HTTP status code.
| |
| url | string | What was the called URL (should match the |
Bad Request (e.g. header is invalid, apikey is missing or invalid, parameter value is invalid or out of range, etc).
Invalid user information or Not Allowed
Requests resource was not found.
Unexpected event on server.
Batch
Group the analysis requests in batches. Supported with endpoints: MetaDefender Cluster API Gateway.
Initiate Batch
Create a new batch and retrieve the batch_id
| apikey | string | Generated | |
| rule | string | Select rule for the analysis, if no header given the default rule will be selected (URL encoded UTF-8 string of rule name) | |
| user | string | user_agent header used to identify (and limit) access to a particular rule. For rule selection, | |
| user | string | Name of the batch (max 1024 bytes, URL encoded UTF-8 string). | |
| client | string | The
|
Batch created successfully.
| object | object | ||
| batch | string | The batch identifier used to submit files in the batch and to close the batch. |
Bad Request (e.g. header is invalid, apikey is missing or invalid, parameter value is invalid or
out of range, etc). The request is rejected before the file is processed, so no data_id is
created.
When the client-identity header is present but its value is invalid, err is one of:
err |
Cause |
|---|---|
Header 'client-identity' is empty |
The header was sent without a value. |
Header 'client-identity' must be less than or equal 4096 characters |
The header value is longer than 4096 characters. |
Header 'client-identity' contains non-printable character |
The value contains an ASCII control character, either directly or through an escape. |
Header 'client-identity' is not in JSON format |
The value could not be URL-decoded, is not valid JSON, or is not a JSON object. |
Header 'client-identity' does not contain a 'clients' key or empty 'clients' |
clients is missing, is not an array, or is an empty array. |
Header 'client-identity' contains an invalid data |
An entry of clients is not a JSON object. |
Header 'client-identity' does not contain required key '<key>' |
An entry is missing deployment_id, user_name, product_type or timestamp. |
Header 'client-identity' contains a non-string '<key>' |
deployment_id, user_name or product_type is not a string. |
Header 'client-identity' contains an empty '<key>' |
deployment_id, user_name or product_type is blank. |
Header 'client-identity' contains an invalid 'deployment_id' |
deployment_id holds anything other than letters and digits. |
Header 'client-identity' contains a non-integer 'timestamp' |
timestamp is not an integer. |
Header 'client-identity' contains a negative 'timestamp' |
timestamp is zero or negative. |
Every entry of clients is checked, not only the first one, and the first rule that fails is the
one reported.
Invalid user information or Not Allowed
Unexpected event on server.
Close Batch
The batch will be closed and files can no longer be added to the current batch.
| apikey | string | Generated |
| batchId | string | The batch identifier used to submit files in the batch and to close the batch. |
Batch successfully closed.
| object | object | The response for a Batch status request. | |
| batch | object | Information about the files included in this batch. | |
| batch | integer | The total number of files/entries in the batch. | |
| current | integer | The total number of files/entries that have been fully processed in the batch. | |
| files | array[object] | The list of files in the batch. | |
| data | string | Unique identifer for the file. | |
| detected | integer | Total number of engines that detected this file. | |
| display | string | The filename reported via | |
| file | integer | Total file size in bytes. | |
| file | string | The filetype using mimetype. | |
| file | string | The filetype in human readable format. | |
| process | object | The analysis summary | |
| blocked | string | Provides the reason why the file is blocked (if so). | |
| progress | integer | Percentage of processing completed (from 1-100). | |
| result | string | The final result of processing the file (Allowed / Blocked / Processing). | |
| verdicts | array[string] | Aggregated list of potential issues. | |
| client | object | The | |
| clients | array[object] | Array of client identity objects. | |
| deployment | string | Unique identifier for the deployment. | |
| user | string | Name of the user or system that initiated the scan. | |
| product | string | Type of product or system that is performing the scan. | |
| version | string | Version of the product or system. | |
| host | string | Hostname or IP address of the client machine. | |
| timestamp | integer | Timestamp of when the scan was initiated, in milliseconds since epoch. | |
| progress | integer | Track analysis progress until reaches 100. | |
| scan | string | Processing result and its index
Enum: | |
| scan | integer | Scan result as index in the Processing Results table above Enum: | |
| scanned | integer | The total number of engines used to analyze this file. | |
| first | integer | The starting index in the batch. Used for pagination. | |
| page | integer | The number of entries per page. | |
| batch | string | The batch unique identifer | |
| is | boolean | The batch status (open/close). | |
| process | object | Overall batch process result | |
| blocked | string | Provides the reason why the file is blocked (if so). | |
| file | boolean | Indicates if the input file's detected type was configured to skip scanning. | |
| profile | string | The used rule name. | |
| result | string | The final result of processing the file (Allowed / Blocked / Processing). | |
| user | string | Identifier for the REST Client that calls the API. | |
| username | string | User identifier who submitted scan request earlier. | |
| client | object | The | |
| clients | array[object] | Array of client identity objects. | |
| deployment | string | Unique identifier for the deployment. | |
| user | string | Name of the user or system that initiated the scan. | |
| product | string | Type of product or system that is performing the scan. | |
| version | string | Version of the product or system. | |
| host | string | Hostname or IP address of the client machine. | |
| timestamp | integer | Timestamp of when the scan was initiated, in milliseconds since epoch. | |
| scan | object | Metascan analysis result. | |
| batch | string | The batch unique identifer | |
| scan | string | Processing result and its index
Enum: | |
| scan | integer | Scan result as index in the Processing Results table above Enum: | |
| start | string | Timestamp when the scanning process starts. | |
| total | integer | Total number of scanning engines used as part of this analysis. Not like files, batch is not processed by engine, so this value is always 0. | |
| total | integer | Total time elapsed during scan (in milliseconds). | |
| user | string | Metadata submitted at batch creation. |
Bad Request (e.g. header is invalid, apikey is missing or invalid, parameter value is invalid or out of range, etc).
Invalid user information or Not Allowed
Requests resource was not found.
Unexpected event on server.
Status of Batch Analysis
Retrieve status report for the entire batch
| apikey | string | Generated |
| batchId | string | The batch identifier used to submit files in the batch and to close the batch. |
| first | integer | The first item order in the list of files in this batch minimum: 0 Default: 0 | |
| size | integer | The number of items to be fetched next, counting from the item order indicated in maximum: 2000 minimum: 0 Default: 50 |
Batch progress paginated report (50 entries/page).
| object | object | The response for a Batch status request. | |
| batch | object | Information about the files included in this batch. | |
| batch | integer | The total number of files/entries in the batch. | |
| current | integer | The total number of files/entries that have been fully processed in the batch. | |
| files | array[object] | The list of files in the batch. | |
| data | string | Unique identifer for the file. | |
| detected | integer | Total number of engines that detected this file. | |
| display | string | The filename reported via | |
| file | integer | Total file size in bytes. | |
| file | string | The filetype using mimetype. | |
| file | string | The filetype in human readable format. | |
| process | object | The analysis summary | |
| blocked | string | Provides the reason why the file is blocked (if so). | |
| progress | integer | Percentage of processing completed (from 1-100). | |
| result | string | The final result of processing the file (Allowed / Blocked / Processing). | |
| verdicts | array[string] | Aggregated list of potential issues. | |
| client | object | The | |
| clients | array[object] | Array of client identity objects. | |
| deployment | string | Unique identifier for the deployment. | |
| user | string | Name of the user or system that initiated the scan. | |
| product | string | Type of product or system that is performing the scan. | |
| version | string | Version of the product or system. | |
| host | string | Hostname or IP address of the client machine. | |
| timestamp | integer | Timestamp of when the scan was initiated, in milliseconds since epoch. | |
| progress | integer | Track analysis progress until reaches 100. | |
| scan | string | Processing result and its index
Enum: | |
| scan | integer | Scan result as index in the Processing Results table above Enum: | |
| scanned | integer | The total number of engines used to analyze this file. | |
| first | integer | The starting index in the batch. Used for pagination. | |
| page | integer | The number of entries per page. | |
| batch | string | The batch unique identifer | |
| is | boolean | The batch status (open/close). | |
| process | object | Overall batch process result | |
| blocked | string | Provides the reason why the file is blocked (if so). | |
| file | boolean | Indicates if the input file's detected type was configured to skip scanning. | |
| profile | string | The used rule name. | |
| result | string | The final result of processing the file (Allowed / Blocked / Processing). | |
| user | string | Identifier for the REST Client that calls the API. | |
| username | string | User identifier who submitted scan request earlier. | |
| client | object | The | |
| clients | array[object] | Array of client identity objects. | |
| deployment | string | Unique identifier for the deployment. | |
| user | string | Name of the user or system that initiated the scan. | |
| product | string | Type of product or system that is performing the scan. | |
| version | string | Version of the product or system. | |
| host | string | Hostname or IP address of the client machine. | |
| timestamp | integer | Timestamp of when the scan was initiated, in milliseconds since epoch. | |
| scan | object | Metascan analysis result. | |
| batch | string | The batch unique identifer | |
| scan | string | Processing result and its index
Enum: | |
| scan | integer | Scan result as index in the Processing Results table above Enum: | |
| start | string | Timestamp when the scanning process starts. | |
| total | integer | Total number of scanning engines used as part of this analysis. Not like files, batch is not processed by engine, so this value is always 0. | |
| total | integer | Total time elapsed during scan (in milliseconds). | |
| user | string | Metadata submitted at batch creation. |
Bad Request (e.g. header is invalid, apikey is missing or invalid, parameter value is invalid or out of range, etc).
Invalid user information or Not Allowed
Requests resource was not found.
Unexpected event on server.
Download Signed Batch Result
Download digitally signed status report for the entire batch
| apikey | string | Generated | |
| metadata | string | In JSON format, this can be used to: Include additional information in the response YML. Currently, one supported field in the metadata is |
| batchId | string | The batch identifier used to submit files in the batch and to close the batch. |
Signed batch result and certificate are sent back in response body (YAML format).
| No response body |
Bad Request (e.g. header is invalid, apikey is missing or invalid, parameter value is invalid or out of range, etc).
Invalid user information or Not Allowed
Requests resource was not found.
Unexpected event on server.
Cancel Batch
When cancelling a batch, the connected analysis that are still in progress will be cancelled also.
The cancelled batch will be closed.
| apikey | string | Generated |
| batchId | string | The batch identifier used to submit files in the batch and to close the batch. |
Batch cancelled.
| object | object |
Bad Request (e.g. header is invalid, apikey is missing or invalid, parameter value is invalid or out of range, etc).
Invalid user information or Not Allowed
Batch not found (invalid id)
Unexpected event on server.
License
Retrieve the current license information.
Get current license information
Fetch details about the longest expiry active license among all activated licenses.
| apikey | string | Generated |
Information about the licensed product (product type, number of activations, deploymentId, expiration date and days left)
| object | object | Information about the licensed product (product type, number of activations, deploymentId, expiration date and days left) | |
| days | integer | Number of days left before expiration | |
| expiration | string | Expiration date in MM/DD/YYYY format. | |
| licensed | array[string] | List of engine/module identifiers that have been licensed | |
| licensed | string | Name of the entity to which the license is issued. | |
| max | string | Total number of deployed MetaDefender Agents attached to this MetaDefender Core instance. | |
| online | boolean | Track online/offline activation mode | |
| product | string | Official MetaDefender base SKU licensed. | |
| product | string | Official MetaDefender base product name licensed. |
Invalid user information or Not Allowed
The user has no rights for this operation.
Unexpected event on server.
Stats
Health check and statistics about MetaDefender Core instance usage.
Engine Status
Return the status of the latest engines between the MetaDefender Core instances.
| apikey | string | Generated |
An array with all the engines and their details.
| array | array[object] | ||
| abandoned | boolean | Indicates if this engine is abandoned. | |
| active | boolean | If used by at least one engine | |
| def | string | The database definition time for this engine | |
| download | integer | The percentage progress of download | |
| download | string | When this engine downloaded from the update server. | |
| eng | string | Engine internal ID | |
| eng | string | Engine name | |
| eng | string | Engine type in human readable form | |
| eng | string | Engine's version (format differs from one engine to another). | |
| engine | string | Engine's type:
Enum: | |
| pinned | boolean | Indicate if this engine is pinned. | |
| state | string | Status of the engine:
Enum: | |
| type | string | The type of information, whether it is engine or engine's database. |
Instance Status Overview
Retrieve status details of all available MetaDefender Core instances.
| apikey | string | Generated |
Status details of MetaDefender Core instances.
| object | object | ||
| external | boolean | Indicates whether external nodes can connect; always true. | |
| max | integer | Total number of available MetaDefender Core instances. | |
| statuses | array[object] | List of MetaDefender Core instance status details. | |
| address | string | Location of the Core instance; currently always return empty string. | |
| available | integer | The number of available RAM in this system. | |
| cpu | integer | The number of CPU Cores allocated to this Core instance. | |
| current | integer | Number of objects currently being processed by the Core instance. | |
| engines | array[object] | Summary of each engine status deployed on this Core. | |
| active | boolean | If used by at least one engine | |
| db | string | The database version for this engine | |
| def | string | The database definition time for this engine | |
| download | string | The database download time for this engine | |
| eng | string | Engine name | |
| eng | string | Engine's version (format differs from one engine to another). | |
| engine | string | Engine's type:
Enum: | |
| id | string | Engine internal ID | |
| free | integer | Reported available disk on Core instance (in bytes). | |
| id | string | Identifier of the worker that deployed this Core instance. | |
| info | array[object] | Report disk space usage from the host where the MetaDefender Core instance is installed. | |
| free | integer | Free space on the disk (in bytes). | |
| location | string | Disk location. | |
| total | integer | Total space on the disk (in bytes). | |
| issues | array[object] | A list of all potential problems on Core instance. | |
| description | string | Text detailing the issue. | |
| severity | string | How important is the reported issue. | |
| load | integer | Current CPU utilization on Core instance (in percentage). | |
| os | string | Current used OS | |
| scan | integer | Number of objects currently being processed by the Core instance. | |
| scan | object | Current load of scan queue in details | |
| archive | number | Ratio of archive scan queue, always -1 for Core in Cluster mode. | |
| available | integer | The number of slots is available, always -1 for Core in Cluster mode. | |
| extracted | integer | Number of child files being processing | |
| file | integer | Number of files taken from REST by the current Core instance | |
| total | integer | Total scan queue, always -1 for Core in Cluster mode. | |
| total | integer | The amount of disk space is allocated on Core instance (in Byte). | |
| total | integer | How much memory is allocated on Core instance (in MB). | |
| total | integer | The maximum queue size is allowed, always -1 for Core in Cluster mode. | |
| uptime | integer | How long this Core is in operation (in second). | |
| version | string | Product version |
Invalid user information or Not Allowed
The user has no rights for this operation.
Get health check status
Fetch current status of system health.
| verbose | boolean | Optional. Show detailed result of system health. |
System is currently healthy.
| object | object | System readiness / health status. | |
| status | boolean | System-wide status, indicate if all components are healthy. | |
| scan | object | Scan queue status. | |
| number | integer | Number of objects being processed by the system. | |
| status | boolean | The operational status of the scan process; true if the system contains the required minimum of healthy MetaDefender Core instances. | |
| license | object | License status. | |
| status | string | License status. Enum: | |
| components | object | Core component statuses. | |
| status | boolean | Aggregate component status. | |
| clusterdb | object | Configuration database status. | |
| status | boolean | Configuration database overall status. | |
| detail | string | Status detail message. | |
| datalake | object | DataLake status. | |
| status | boolean | DataLake overall status. | |
| detail | string | Status detail message | |
| caching | object | Caching status. | |
| status | boolean | Caching overall status. | |
| detail | string | Status detail message. | |
| broker | object | Broker status. | |
| status | boolean | Broker overall status. | |
| detail | string | Status detail message. | |
| filestorage | object | MetaDefender Cluster File storage status. | |
| status | boolean | MetaDefender Cluster File storage overall status. | |
| detail | string | Status detail message. | |
| identity | object | MetaDefender Cluster Identity service status. | |
| status | boolean | MetaDefender Cluster Identity service overall status. | |
| detail | string | Status detail message. | |
| ometascan | object | Status of MetaDefender Core instances | |
| status | boolean | MetaDefender Core overall status. | |
| detail | string | Detail message. | |
| instance | array[string] | List of instance status. | |
| callback | object | Webhook callback service status. | |
| status | boolean | Callback service overall status. | |
| instance | array[string] | List of instance status. | |
| download | object | MetaDefender Cluster Download Service status (scan from link).
This status does not affect the overall system | |
| status | boolean | Download Service overall status. | |
| instance | array[string] | List of instance status. |
Unexpected event on server.
System is currently unhealthy.