Query File Status

Title

Query the current status of a file

URL Path

vault_rest/file/status/{file_id}

Method

GET

Http return

200, 400, 401, 403, 404, 500

Table of Contents

Last Updated

20 May 2021

Summary

This API lets you query the current status of a file in MetaDefender Vault.

HTTP header parameters

Authorization

The API key of the caller

REQUIRED

This header should have the following format:
Bearer

Example: Bearer Cp01BwnXAIOLZXxn7yogjKqIZnZpQD

Method: GET

file_id

File ID of MetaDefender Vault file returned by Upload file call.

REQUIRED

Request Error

400

Bad Request

Invalid HTTP request

401

Unauthorized

Access to the file status is not available to the current user.

404

Not found

File was not found in the database

500

Internal Server Error

Server is temporarily unavailable

Response

Example of a successful request:

{
"administrator_approval_state": "ApprovalDisabled",
"availability_state": "Available",
"can_be_deleted": true,
"can_be_downloaded": true,
"can_be_rescanned": true,
"current_approval_count": 0,
"file_id": "f3c65a22b48947eb98d206a09ba0c4ab",
"is_locked": false,
"is_sanitized": false,
"name": "done.gif",
"processing_state": "Available",
"required_approval_count": 1,
"scan_result": {
"actions_failed": "",
"blocked_reason": "",
"workflow_result": "Allowed"
},
"supervisor_approval_state": "ApprovalDisabled",
"unlock_eta": null,
"first_upload_time": "2018-11-02T13:22:16.0000000",
"is_file_owned": true,
"path": "My Folder\\Documents",
"size": 1307049
}

Description of the response:

Parameter

Description

Details

administrator_approval_state

The state of the file in terms of Supervisor Approval Process

 

availability_state

The current status of the file (as string)

 

can_be_deleted

Flag that specifies if the file can be deleted

 

can_be_downloaded

Flag that specifies if the file is available for download

 

can_be_rescanned

Flag that specifies if the file can be re-processed again with Metadefender Core

 

current_approval_count

Count of supervisor approvals of the file

 

file_id

GUID of the file

 

is_locked

Flag that will specify if the file is locked by Outbreak Prevention

 

is_sanitized

Flag that specifies if the file was sanitized

 

name

The name of the file that will be displayed

 

processing_state

The current status of the file processing state

UploadingFromRestStreamMode = -3,
UploadingFromRestChunkMode = -4,
UploadingFromRestCommitted = -5,
New = 0,
CalculatingChecksum = 1,
Scanning = 5,
QueuedForTransferToFileStorage = 6,
TransferringToFileStorage = 7,
Available = 8,
WaitingForChecksum = 10,
RegularRescanning = 12,
ManualRescanning = 120,
RescanBeforeUnlock = 13,
WaitingForUnlockNotifications = 18,
SendingUnlockNotifications = 19,
WaitingForFinalState = 20,
SetFinalState = 21,
ChecksumFailed = 1001,
ScanFailed = 1005,
TransferToFileStorageFailed = 1007,
RescanFailed = 1009,
SendingUnlockNotificationsFailed = 1012,
SetFinalStateFailed = 1013

required_approval_count

The number of required supervisor approvals to be approved

 

scan_result

The scan result

Scan result contains three fields:

  • actions_failed

  • blocked_reason

  • workflow_result

supervisor_approval_state

The state of the file in terms of Supervisor Approval Process

 

unlock_eta

Approximate time until the file will be unlocked

 

first_upload_time

The date and time of the first upload in UTC format

 

is_file_owned

Flag that specifies if the user that called the API is the owner of the file

 

path

The path of the file

for example: My Folder\Documents

size

The size of the file in bytes