/msp-api-examples

Sample code on using Firewalla MSP API

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

Firewalla Managed Security Portal (MSP) API Examples

This repository contains code examples that demonstrate how to use Firewalla MSP API to interact with Firewalla MSP. You can read, play with or adapt from these examples to create your own appliance.

Prerequisites

  • A Firewalla MSP account and a valid plan
  • Access token from your MSP account, check the document for details

Quick Start

Node Examples

You could use either file or environment variable to setup your MSP domain and credential, check each example for details

git clone https://github.com/firewalla/msp-api-examples.git
cd msp-api-examples/node-examples
npm install
domain="<YOUR-MSP-DOMAIN>" token="<YOUR-MSP-TOKEN>" node ./flows/flow-pagination.js

Shell Examples

Similar as Node Examples, install required tools and modify the configurations, then run the examples.

Samples

Sample Firewalla MSP API Document Contributors
Flow Pagination Flow
Target list with CloudFlare Target List @CozMedic
Target list with CrowdSec Target List @CozMedic
Get Security alarms and send to Discord Alarm
Get Box Devices Device

Disclaimer

As Firewalla MSP API operates directly on your data without prompt. Be very careful writing your own appliance. Dry runs are recommended before any write request.

Contributing

Pull requests are welcome. Lastest development happens on main branch

You might also want to check our user community on firewalla.com and reddit