Use the Trend Vision One™ File Security Node.js SDK to scan files for malware.
The Node.js SDK for Trend Vision One™ File Security empowers you to craft
applications which seamlessly integrate with File Security. With this SDK you can
perform a thorough scan of data and artifacts within your applications to identify
potential malicious elements.
Follow the steps below to set up your development environment and configure your
project, laying the foundation to effectively use File Security.
Checking prerequisites
Before installing the SDK, ensure you have the following:
-
Trend Vision One account associated with your region
-
Configuring custom user roles with File Security permissions
When you have all the prerequisites, continue with creating an API key.
Creating an API key
The File Security SDK requires a valid API key provided as a parameter to the SDK
client object. Trend Vision One API keys are associated with different regions.
Refer to the region flag below to obtain a better understanding of the valid
regions associated with the API key.
Procedure
- Go to .
- Click Add API Key.
- Configure the API key to use the role with the Run file scan via SDK permission.
- Verify that the API key is associated with the region you plan to use.
- Set an expiry time for the API key and make a record of it for future reference.
Installing the SDK
Procedure
- Ensure you have already created the API key.
- Run the following commands in your Node.js application folder to install
the Node.js package.
npm install file-security-sdk
- Continue to authenticating.
Authenticating
Procedure
- Supply the AMaaSHostName and API Key to initiate a new instance of the
AmaasGrpcClient.
import { AmaasGrpcClient } from "file-security-sdk";
- Use a fully qualified domain name (FQDN) with or without a port. Replace
__REGION__
with the region of your Trend Vision One account.const amaasHostName = "antimalware.__REGION__.cloudone.trendmicro.com:443";
- Use the region. Replace
__REGION__
with the region of your Trend Vision One account.const amaasHostName = __REGION__;
- Replace
__YOUR_OWN_VISION_ONE_API_KEY__
with your own Trend Vision One API key.const key = __YOUR_OWN_VISION_ONE_API_KEY__;
- Create a new instance of the
AmaasGrpcClient
class using the key.const scanClient = new AmaasGrpcClient(amaasHostName, key);
What to do next
Refer to the following resources as needed: