Skip to content

Dennis14e/node-opnsense

Folders and files

NameName
Last commit message
Last commit date
Feb 24, 2025
Feb 20, 2022
Feb 20, 2022
May 2, 2022
Dec 26, 2020
May 2, 2022
Feb 3, 2021
Feb 20, 2022
Feb 20, 2022
Feb 20, 2022
Mar 24, 2025
Mar 24, 2025

Repository files navigation

Node OPNsense Client API (node-opnsense)

npm npm bundle size Build CodeQL

This Node Client API is mostly based on the documentation here and the source code here. However, it is known that the documentation is not always up to date.

Not every one of these APIs have been tested. It is possible that e.g. input parameters may be missing.

Use at your own risk.

Example

const OPNsense = require('./src/index');

const client = new OPNsense.Client(
    'https://opnsense.local/',
    'api-key',
    'api-secret'
);

new OPNsense.Wol.WolClient(client).wakeByMAC('AA:BB:CC:00:11:22').then(res => {
    console.log(res);
});

NPM scripts

Command Description
npm run lint Lint code in ./src
npm run jsdoc Generate documentation ./docs
npm run openapi Generate OpenAPI file ./openapi/openapi.json