5.2.1 Process one or more files

This API is only available for Amazon S3 and S3-Compatible storage units at the moment.

Title

Process one or more files from your storage unit

URL Path

/api/file/process

Method

POST

Summary

Download individual files from a storage for processing with MetaDefender Core technologies. For example, a third-party application detects newly uploaded files to an Amazon S3 storage and sends them to MetaDefender for Secure Storage via AWS Lambda.

HTTP Headers

Authorization

required

Bearer <JWT>

Sample HTTP body

{
"FilePaths": ["test/picture.jpeg", "document.txt"],
"StorageName": "My Storage",
"StorageType": "AmazonS3"
}

Description of request

StorageName

The name of the storage unit containing the files

string value

StorageType

Type of the storage

Possible values:

  • AmazonS3

FilePaths

An array of paths for the files to be processed

array of strings

Request errors

400 Bad Request

Invalid HTTP request

401 Unauthorized

Unauthorized HTTP request

404 Not Found

The requested resource could not be found

500 Internal Server Error

Server is temporarily unavailable

Response

Example of a successful request:

{
"FileIds": [
"5d7a33198b0a56f2b9c3dbb3",
"5d7a33198b0a56f2b9c3dbb4"
],
"ResponseKey": "STARTED_PROCESSING_FILE",
"ResponseMessage": "Started processing file"
}

Description of response

FileIds

Array of unique file identifiers

A list of generated IDs for the requested files that can be used to query results at a later time

ResponseKey

Response message key

A message key that can be used for internalization

ResponseMessage

Response message

A message describing the result of the request