Skip to main content

File Scan | Node.js SDK

File Scan

constructor(token: PangeaToken, config: PangeaConfig): FileScanService

Creates a new FileScanService with the given Pangea API token and configuration.

required parameters

PangeaToken

Pangea API token.

Configuration.

Response Object

FileScanService
const config = new PangeaConfig({ domain: "pangea_domain" });
const client = new FileScanService("pangea_token", config);

Scan

fileScan(request: ScanRequest, file: string | FileData, options: Options): Promise<PangeaResponse<ScanResult>>

Scan a file for malicious content.

required parameters

ScanRequest
string | FileData
Options

Response Object

Promise<PangeaResponse<ScanResult>>
const request = { verbose: true, raw: true, provider: "crowdstrike" };
const response = await client.fileScan(request, "./path/to/file.pdf");

Interface Options

Options

optional parameters

boolean

Interface ScanFileParams

ScanFileParams

required parameters

string
string
number

Interface ScanFullRequest

ScanFullRequest

required parameters

string
string
number

optional parameters

string
boolean
string
TransferMethod
boolean

Interface ScanRequest

ScanRequest

optional parameters

string
boolean
string
TransferMethod
boolean

Interface ScanResult

ScanResult

required parameters

optional parameters

Dictionary
Dictionary