This section of the user guide describes how you can programmatically interact with the MetaDefender Storage Security REST API. Below are some common tasks that can be done using the available REST APIs:

  • Authenticate to obtain a JSON Web Token(JWT)
  • Start or stop a process(scan)
  • Add / remove storage units

About this REST API

The exposed endpoint is located by default at http(s)://md-storage-server/api/ (for example, the authentication endpoint is available at http(s)://md-storage-server/api/user/authenticate). All requests are handled by the NGINX web server before being proxied to the backend API Gateway service.

All endpoints perform authentication and authorization checks. For these checks to succeed, a valid token should be presented in the Authorization header in the form of Bearer.

Please note that all issued tokens have a timestamp and signature associated in order to prevent long-term usage without re - authentication.The lifespan of the token is currently set to 60 minutes, meaning you will have to request a new token before it expires in order to avoid error responses.

Server
http://<MDSS_HOST>
Server Variables

Fetch all accounts

Retrieve a list of all configured accounts

Auth
GET /api/account
Copy
Responses
200
Response
Copy

Add an account

Add a new storage account to the system

Auth
Query String
Request Body
POST /api/account
Responses
200
Response

Update an account

Update an existing account's configuration

Auth
Query String
Request Body
PATCH /api/account
Responses
200
Response

Fetch account by ID

Retrieve a single account's details by ID

Auth
Path Params
GET /api/account/{accountId}
Responses
200
Response

Delete an account

Permanently delete an account and its storage references

Auth
Path Params
DELETE /api/account/{accountId}
Responses
200
Response

Fetch available storage units for an account

List all storage units linked to a particular account

Auth
Path Params
GET /api/account/{accountId}/storages
Responses
200
Response

Fetch the number of accounts

Get the total number of accounts in the system

Auth
GET /api/account/count
Responses
200
Response

Fetch account sources

Fetch account sources

Auth
Path Params
Query String
GET /api/account/{accountId}/sources
Responses
200
Response

Audit

List audit information

Fetch audit logs

Auth
Path Params
Query String
GET /api/audit/{startIndex}/{count}
Responses
200
Response

Export configuration file

Export the current configuration settings to an archive. The file will be encrypted using the provided password.

Auth
Query String
GET /api/configuration/export
Responses
200
Response

Import configuration file

Auth
Request Body
POST /api/configuration/import
Responses
200
Response

Get enabled modules

Auth
GET /api/configuration/enabledModules
Responses
200
Response

Connector

connector

Auth
Query String
GET /api/connector
Responses
200
Response

Retrieve external loggers

Auth
GET /api/externallogger
Responses
200
Response

Update external logger state

Auth
Request Body
PUT /api/externallogger/status
Responses
200
Response

Update a Syslog server configuration

Auth
Request Body
PUT /api/externallogger/udpSyslog
Responses
200
Response

Add a new Syslog server configuration

Auth
Request Body
POST /api/externallogger/udpSyslog
Responses
200
Response

Update a Kafka server configuration

Auth
Request Body
PUT /api/externallogger/kafka
Responses
200
Response

Add a new Kafka server configuration

Auth
Request Body
POST /api/externallogger/kafka
Responses
200
Response

Delete external logger

Auth
Path Params
DELETE /api/externallogger/{id}
Responses
200
Response

Enumerate processed files

Auth
Query String
GET /api/file
Responses
200
Response

Rescan a file on demand

This request is used to update a scanned file with passwords, in case it is an encrypted archive andit could not be scanned because the passwords to decrypt it were not provided. It can also be used withoutproviding any passwords to simply rescan a specific file from a finished scan.

Auth
Request Body
PUT /api/file
Responses
200
Response

Rescan multiple files on demand

This request is used to rescan and update existing files from a scan based on a filter.

Auth
Request Body
PUT /api/file/rescan
Responses
200
Response

Fetch processing results for a file

File processing is done asynchronously and each analysis request is tracked by a file ID. Because processing a file is a potentially time-consuming operation, scheduling a file for processing and retrieving the results needs to be done using two separate API calls.

This request needs to be made multiple times until the analysis is complete. Analysis completion can be tracked using the processingState and the progress values from the response..

Auth
Path Params
Query String
GET /api/file/{fileId}
Responses
200
Response

Retrieve archive scan results

Retrieve the archive scan results using either the scanResultId or the parentId

Auth
Query String
GET /api/file/archive
Responses
200
Response

Cancel a file in an ongoing scan

Auth
Request Body
POST /api/file/cancel
Responses
200
Response

Fetch all groups

Auth
GET /api/group
Responses
200
Response

Add a group

Auth
Request Body
POST /api/group
Responses
200
Response

Update a group

Auth
Request Body
PATCH /api/group
Responses
200
Response

Fetch group by ID

Auth
Path Params
GET /api/group/{groupId}
Responses
200
Response

Delete a group

Auth
Path Params
DELETE /api/group/{groupId}
Responses
200
Response

Fetch the number of groups

Auth
GET /api/group/count
Responses
200
Response

Health Status

API that responds with 200 OK if application is running.

Get health status

Auth
Query String
GET /api/health
Responses
200
Response

Fetch onboarding configuration

Auth
Query String
GET /api/onboarding
Responses
200
Response

Finish onboarding

Auth
POST /api/onboarding
Responses
200
Response

Accept Eula

Auth
POST /api/onboarding/eula
Responses
200
Response

Get Remediations by workflow id

Auth
Path Params
GET /api/remediations/workflow/{id}
Responses
200
Response

Get Remediation by id

Auth
Path Params
GET /api/remediations/{id}
Responses
200
Response

Delete Remediation

Auth
Path Params
DELETE /api/remediations/{id}
Responses
200
Response

Add Remediation

Auth
Request Body
POST /api/remediations
Responses
200
Response

Update Remediation

Auth
Request Body
PATCH /api/remediations
Responses
200
Response

Report

Generate reports

Get scans report

Auth
Query String
GET /api/report
Responses
200
Response

Download PDF Report

Auth
Path Params
Query String
GET /api/report/download/{scanId}
Responses
200
Response

Get scan by ID

Auth
Path Params
GET /api/scan/{scanId}
Responses
200
Response

Start a scan

To scan a specific folder using the optional Folder parameter, provide the absolute folder path: For Amazon S3 / S3 Compatible Types, Azure Blob, Azure Files, Google Cloud, Alibaba Cloud and Oracle Native: Including the Folder Location integrated in MDSS and excluding the Bucket Name, Container, etc. For Box: With or without the "All Files" folder For Sharepoint and Onedrive: Excluding the Document Library, Site, or Group For OPSWAT MFT Storage: The desired Folder Path when integrating with user For NFS / SMB / SFTP / FTP / SharePoint OnPrem: Only the folder path beyond your configured storage root (do not include the base path set during integration) Provide the absolute folder path in the following format "{"Folder":"PATH_TO_SCAN"}

Auth
Request Body
POST /api/scan/start
Responses
200
Response

Stop a scan

Auth
Path Params
POST /api/scan/stop/{scanId}
Responses
200
Response

Delete scans

Auth
Path Params
Query String
Request Body
DELETE /api/scan/{storageId}
Responses
200
Response

Fetch last completed scan

Auth
Path Params
GET /api/scan/last_completed/{storageId}
Responses
200
Response

Get an active scan by scan ID

Auth
Path Params
GET /api/scan/active/{scanId}
Responses
200
Response

Get Real-Time scan by storage Id

Auth
Path Params
GET /api/scan/realtime/{storageId}
Responses
200
Response

Get Scan Instances

Auth
Query String
GET /api/scaninstance
Responses
200
Response

Update an existing Scan Instance

Auth
Request Body
PUT /api/scaninstance
Responses
200
Response

Add a new Scan Instance

Auth
Request Body
POST /api/scaninstance
Responses
200
Response

Get Scan Instance by ID

Auth
Path Params
GET /api/scaninstance/{id}
Responses
200
Response

Delete a Scan Instance

Auth
Path Params
DELETE /api/scaninstance/{id}
Responses
200
Response

Test

Auth
Request Body
POST /api/scaninstance/Test
Responses
200
Response

Get Scan Pools

Auth
GET /api/scanpool
Responses
200
Response

Update an existing Scan Pool

Auth
Request Body
PUT /api/scanpool
Responses
200
Response

Add a new Scan Pool

Auth
Request Body
POST /api/scanpool
Responses
200
Response

Get Scan Pool by ID

Auth
Path Params
GET /api/scanpool/{id}
Responses
200
Response

Delete a Scan Pool

Auth
Path Params
DELETE /api/scanpool/{id}
Responses
200
Response

Scan Workflow Snapshot

List scan workflow snapshots

Get all scan workflow snapshots by scan ID

Auth
Path Params
GET /api/scanworkflowsnapshot/getAllFromScan/{scanId}
Responses
200
Response

Get notifications configuration

Auth
GET /api/settings/notifications
Responses
200
Response

Update notifications configuration

Auth
Request Body
PUT /api/settings/notifications
Responses
200
Response

Fetch SMTP configuration

Auth
GET /api/settings/smtp
Responses
200
Response

Update SMTP configuration

Auth
Request Body
PATCH /api/settings/smtp
Responses
200
Response

Online license activation

Auth
Request Body
POST /api/settings/admin/license/activate/online
Responses
200
Response

Offline license activation

Auth
Request Body
POST /api/settings/admin/license/activate/offline
Responses
200
Response

Get license details

Auth
GET /api/settings/admin/license
Responses
200
Response

Deactivate license

Auth
POST /api/settings/admin/license/deactivate
Responses
200
Response

Fetch retention configuration

Auth
GET /api/settings/retention
Responses
200
Response

Update retention configuration

Auth
Request Body
PUT /api/settings/retention
Responses
200
Response

Generate encryption key

Generate a new encryption key, replacing the old one if it exists.

Auth
POST /api/settings/encryption/generate
Responses
200
Response

Get encryption key creation date

Get the creation date of the encryption key.

Auth
GET /api/settings/encryption/creation-date
Responses
200
Response

Get SSL configuration

Get current SSL configuration status.

Auth
GET /api/settings/ssl
Responses
200
Response

Update SSL configuration

Update SSL configuration of MDSS by uploading a certificate and a key to enable SSL.

Auth
Request Body
POST /api/settings/ssl
Responses
200
Response

Get Single User Session

Get Simultaneous Sessions allowed for a Single User.

Auth
GET /api/settings/single-user-session
Responses
200
Response

Update Single User Session

Update Simultaneous Sessions allowed for a Single User.

Auth
Request Body
POST /api/settings/single-user-session
Responses
200
Response

Get Teemetry configuration.

Get MDSS Open Telemetry configuration.

Auth
GET /api/settings/telemetry
Responses
200
Response

Update Telemetry configuration.

Update MDSS Open Telemetry configuration.

Auth
Request Body
POST /api/settings/telemetry
Responses
200
Response

Sso

Sso Authentication and Sso configuration update

Get Sso Configuration

Allows retrieval of the current SSO configuration.

Auth
GET /api/sso/config
Responses
200
Response

Update Sso Configuration

Allows updating the current Sso Configuration.

Auth
Request Body
PATCH /api/sso
Responses
200
Response

Fetch all storage units

Auth
GET /api/storage/all
Responses
200
Response

Fetch storage by ID

Auth
Path Params
GET /api/storage/{storageId}
Responses
200
Response

Delete a storage

Auth
Path Params
Query String
DELETE /api/storage/{storageId}
Responses
200
Response

Update a storage

Note! The following are templates for what is expected in the Credentials, CredentialsFile and Source fields. Please provide the correct values for your storage integration instead of null/false

Alibaba Cloud storage units:
Credentials: "{"Endpoint":null,"AccessKeyId":null,"AccessKeySecret":null,"UseRamRole":false}"
Source: "{"BucketName":null,"FolderLocation":null}"

Amazon S3 / S3 Compatible storage units:
Credentials: "{"ServiceUrl":null,"AccessKeyId":null,"SecretAccessKey":null,"RegionEndpoint":null,"AssumeRoleArn":null,"UseIamRole":false}"
Source: "{"BucketName":null,"FolderLocation":null}"

Azure Blob storage units:
Credentials: "{"TenantId":null,"ClientId":null,"ClientSecret":null,"StorageAccount":null}"
Source: "{"Container":null}"

Azure Files storage units:
Credentials: "{"AccountName":null,"AccountKey":null,"ShareName":null}"
Source: "{"FolderLocation":null}"

Box storage units:
CredentialsFile: upload the credentials file
Source: "{"FolderLocation":null}"

Dell Isilon / SMB Compatible storage units:
Credentials: "{"User":null,"Password":null,"Server":null}"
Source: "{"SharePath":null}"

Google Cloud storage units:
CredentialsFile: upload the credentials file
Credentials: "{"UseAdc":false}"
Source: "{"BucketName":null,"FolderLocation":null}"

Graph storage units:
Credentials: "{"TenantId":null,"ClientId":null,"ClientSecret":null}"
Source: "{"Group":null}"

Auth
Path Params
Request Body
PATCH /api/storage/{storageId}
Responses
200
Response

Fetch storage users

Auth
Path Params
Query String
GET /api/storage/{storageId}/users
Responses
200
Response

Add a storage

Note! The following are templates for what is expected in the Credentials, CredentialsFile and Source fields. Please provide the correct values for your storage integration instead of null/false

Alibaba Cloud storage units:
Credentials: "{"Endpoint":null,"AccessKeyId":null,"AccessKeySecret":null,"UseRamRole":false}"
Source: "{"BucketName":null,"FolderLocation":null}"

Amazon S3 / S3 Compatible storage units:
Credentials: "{"ServiceUrl":null,"AccessKeyId":null,"SecretAccessKey":null,"RegionEndpoint":null,"AssumeRoleArn":null,"UseIamRole":false}"
Source: "{"BucketName":null,"FolderLocation":null}"

Azure Blob storage units:
Credentials: "{"TenantId":null,"ClientId":null,"ClientSecret":null,"StorageAccount":null}"
Source: "{"Container":null}"

Azure Files storage units:
Credentials: "{"AccountName":null,"AccountKey":null,"ShareName":null}"
Source: "{"FolderLocation":null}"

Box storage units:
CredentialsFile: upload the credentials file
Source: "{"FolderLocation":null}"

Dell Isilon / SMB Compatible storage units:
Credentials: "{"User":null,"Password":null,"Server":null}"
Source: "{"SharePath":null}"

Google Cloud storage units:
CredentialsFile: upload the credentials file
Credentials: "{"UseAdc":false}"
Source: "{"BucketName":null,"FolderLocation":null}"

Graph storage units:
Credentials: "{"TenantId":null,"ClientId":null,"ClientSecret":null}"
Source: "{"Group":null}"

Auth
Request Body
POST /api/storage
Responses
200
Response

Add batch of storages

Note! The following are templates for what is expected in the Credentials, CredentialsFile and Source fields. Please provide the correct values for your storage integration instead of null/false

Alibaba Cloud storage units:
Credentials: "{"Endpoint":null,"AccessKeyId":null,"AccessKeySecret":null,"UseRamRole":false}"
Source: "{"BucketName":null,"FolderLocation":null}"

Amazon S3 / S3 Compatible storage units:
Credentials: "{"ServiceUrl":null,"AccessKeyId":null,"SecretAccessKey":null,"RegionEndpoint":null,"AssumeRoleArn":null,"UseIamRole":false}"
Source: "{"BucketName":null,"FolderLocation":null}"

Azure Blob storage units:
Credentials: "{"TenantId":null,"ClientId":null,"ClientSecret":null,"StorageAccount":null}"
Source: "{"Container":null}"

Azure Files storage units:
Credentials: "{"AccountName":null,"AccountKey":null,"ShareName":null}"
Source: "{"FolderLocation":null}"

Box storage units:
CredentialsFile: upload the credentials file
Source: "{"FolderLocation":null}"

Dell Isilon / SMB Compatible storage units:
Credentials: "{"User":null,"Password":null,"Server":null}"
Source: "{"SharePath":null}"

Google Cloud storage units:
CredentialsFile: upload the credentials file
Credentials: "{"UseAdc":false}"
Source: "{"BucketName":null,"FolderLocation":null}"

Graph storage units:
Credentials: "{"TenantId":null,"ClientId":null,"ClientSecret":null}"
Source: "{"Group":null}"

Auth
Request Body
POST /api/storage/batch
Responses
200
Response

Get batch of add storages results

Auth
Query String
GET /api/storage/results
Responses
200
Response

Fetch all storage units by filters (storage type or status)

Auth
Path Params
Query String
GET /api/storage/enumerate/{startIndex}/{count}
Responses
200
Response

Add a scan schedule

Auth
Path Params
Request Body
PUT /api/storage/{storageId}/scan_schedule
Responses
200
Response

Update a scan schedule

Auth
Path Params
Request Body
PUT /api/storage/scan_schedule/update/{storageId}
Responses
200
Response

Fetch scan schedules

Auth
Path Params
Query String
GET /api/storage/scan_schedules/{sortDirection}/{startIndex}/{count}
Responses
200
Response

Delete scan schedules

Auth
Request Body
DELETE /api/storage/scan_schedule
Responses
200
Response

Retrieve storage user name

Auth
Path Params
Query String
GET /api/storage/{storageId}/user
Responses
200
Response

Retrieve storage user name

Auth
Path Params
GET /api/storage/{storageId}/{userId}
Responses
200
Response

Fetch active users

Auth
Path Params
Query String
GET /api/user/active/{startIndex}/{count}
Responses
200
Response

Register a user

Auth
Request Body
POST /api/user/register
Responses
200
Response

Create a user

Auth
Request Body
POST /api/user/create
Responses
200
Response

Authenticate with a username and password

Authenticate with a username and password to obtain a JWT token,Most of the APIs require authentication in the form of providing a JWT token. Call this API in order to receive a token but please note that it's only valid for an hour so it should be periodically refreshed.

Auth
Request Body
POST /api/user/authenticate
Responses
200
Response

Fetch current user information

Retrieve information about the currently authenticated user.

Auth
GET /api/user/me
Responses
200
Response

Refresh user token

Refresh an expired accessToken using a valid refreshToken

Auth
POST /api/user/refreshToken
Responses
200
Response

Logout

Auth
POST /api/user/logout
Responses
200
Response

Update user role

Auth
Request Body
PUT /api/user/role
Responses
200
Response

Fetch users

Auth
Query String
GET /api/user/requests
Responses
200
Response

Delete a user

Auth
Path Params
DELETE /api/user/{userId}
Responses
200
Response

Update current user

Auth
Request Body
PUT /api/user
Responses
200
Response

Request password reset

Auth
Request Body
POST /api/user/password/reset
Responses
200
Response

Reset user password

Auth
Request Body
POST /api/user/password
Responses
200
Response

User Tour

Finalize and list user tours

Fetch tours completed by a user

Auth
Path Params
GET /api/usertour/{userId}
Responses
200
Response

Mark a specific Tour as completed by a user

Auth
Request Body
POST /api/usertour/finalizeUserTour
Responses
200
Response

File event trigger of real time processing

This endpoint takes the parameters and tries to find the file in the specified storage and applies the workflow for the specified file

Auth
Request Body
POST /api/webhook/realtime
Responses
200
400
404
Response

File event trigger of real time processing by storage client ID

This endpoint takes the parameter and tries to find the file in the specified storage and applies the workflow for the specified file

Auth
Path Params
Request Body
No request body
POST /api/webhook/realtime/{storageClientId}
Responses
200
400
404
Response

File event trigger of real time processing by storage client ID

This endpoint takes the parameter and tries to find the file in the specified storage and applies the workflow for the specified file

Auth
Path Params
Request Body
No request body
POST /api/webhook/realtime/{storageClientId}/{scanId}
Responses
200
400
404
Response

File event trigger of real time processing for Box

This endpoint takes the parameter and tries to find the file in the specified Box storage and applies the workflow for the specified file

Auth
Path Params
Request Body
No request body
POST /api/webhook/realtime/public/{storageClientId}
Responses
200
400
404
Response

File event trigger of real time processing for Box

This endpoint takes the parameter and tries to find the file in the specified Box storage and applies the workflow for the specified file

Auth
Path Params
Request Body
No request body
POST /api/webhook/realtime/public/{storageClientId}/{scanId}
Responses
200
400
404
Response

Responses
Response

Responses
Response

Responses
Response