V4 Migration Guide

The following table shows the difference in headers between the API versions for the file upload:

HeaderUsed forV3V4
Authentication header (see API Authentication Mechanisms for details)GeneralAuthorizationapikey
Filename headerFile uploadx-filenamefilename
Scan workflow selectionFile uploadx-rulerule
Archive passwordFile uploadx-archive-passwordarchivepwd
Private scanningFile uploadx-sample-sharingsamplesharing
Scan URLFile uploadx-download-formdownloadform
Bulk hash scan detailsBulk hash lookupx-include-scan-detailsincludescandetails
Include additional hash detailsHash lookupx-file-metadata

Hash Lookup Changes

The hash lookup endpoint would return additional information like PEInfo and EXIF when the "file_metadata" header was passed. In V4 this header was deprecated in favor of the "additional_ info" key in the JSON body response which specifies exactly what additional info the file API can return. To see more information about this header go to MetaDefender Cloud API v4API.

File Scan Changes

The rule header (see MetaDefender Cloud API v4API for more details) used to be a fixed string which specifies what operation to perform on the file. Now the rule header can accept multiple values, separated by commas:

HeaderOperation Performed
multiscanMultiscanning (default, always performed)
sanitizePerform data sanitization
cdrSanitization without multiscanning
unarchiveMultiscanning and unarchiving of the file

The headers can be sent in any combination separated by commas. This allows for future operations to be added in a seamless way, and for clients to easily control operations performed on the file.

Also, the file upload will now return an error if the content type is not one of the supported formats. See MetaDefender Cloud API v4API for details.

Sanitization Change

The old endpoint for downloading the sanitized version of the file: /v4/file/:fileId/sanitizedLink

The new endpoint for downloading the sanitized version of the file starting with v4: /v4/file/converted/:data_id/

This was changed to match the MetaDefender API url.

IP Scanning Changes

The response format of IP scanning has changed:

Old format

Javascript
Copy

New format

Note that in addition to the new format, the "confident" field has also been removed.

Javascript
Copy

Other Changes

V3 response included a "success" key in the JSON, and the rest of the response was in the "data" key. Now both of these keys have been removed and the response contains the content from the "data" key.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard