5.2.2 Process one or more files from OneDrive

Title

Process one or more files from OneDrive

URL Path

/api/file/process/onedrive

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 OneDrive and sends them to MetaDefender for Secure Storage.

HTTP Headers

Authorization

required

Bearer <JWT>

Sample HTTP body

{
"StorageName": "My Storage",
"FilterType": 0,
"Items": [
{
"FilePath": "test/picture.jpeg",
"UserPrincipalName": "user1",
"GroupName": null
}
]
}

Description of request

StorageName

The name of the storage unit containing the files

string value

FilterType

Type of filter

Possible values:

  • 0 - ByUser

  • 1 - ByGroup

Items

Array of objects that contain information about the file

array of objects

Items[].FilePath

The full path of the file

string value

Items[].UserPrinicipalName

The UPN of the owner of the file
(i.e john.doe@company.com)

string value

Items[].GroupName

Used to filter files that belong to the this group*

string value

* When trying to process a file using the ByGroup filter, please note that the file will be searched only in the list of files that belong to the group without looking at any files of group members

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