Function: init()
function init(opts?): void;
Defined in: src/configuration.ts:128
Initialize the global scan API configuration. Must be called before using Scanner.
Parameters
| Parameter | Type | Description |
|---|---|---|
opts | InitOptions | Configuration options. Reads env vars as fallbacks. |
Returns
void
Throws
If neither apiKey nor apiToken is provided.
Example
import { init, Scanner } from '@cdot65/prisma-airs-sdk';
// Reads PANW_AI_SEC_API_KEY and PANW_AI_SEC_API_ENDPOINT from env
init();
// Or pass options explicitly
init({ apiKey: 'your-api-key', numRetries: 3 });
const scanner = new Scanner();