7. Metadefender Core Developer Guide

How to Interact with Metadefender Core using REST

Beginning with Metadefender Core 4.x, OPSWAT recommends using the JSON-based REST API.
The available methods are documented below.

File scan process

  1. Upload a file to scan (POST to /file resource), then receive data_id from response: (Scan File)
    Note: The performance depends on:

    • number of nodes (scaling)

    • number of engines per node

    • type of file to be scanned

    • Metadefender Core and nodes' hardware

  2. Fetch the result with previously received data_id (GET from /file/{data_id resource) until scan result belonging to data_id doesn't reach the 100 percent progress_percentage: (Fetch Scan Result)
    Note: Too many data_id requests can reduce performance. It is enough to just check every few hundred milliseconds.

  3. Retrieve the scan results anytime after the scan is completed with hash for files (md5, sha1, sha256). (The hash can be found in the scan results) (Fetch Scan Result by File Hash)