Node.js example: Connecting to the fortianalyzer xml api

If you’re one of the few people on earth who need to connect to the Fortianalyzer XML API using Node.js, it’s your lucky day! Read on to see working examples of how I got this working.

Fortianalyzer in a nutshell

Let’s get started

Download your WSDL file

Gotcha 1: Change the namespace in your WSDL file

Gotcha 2: Update the Fortianalyzer SOAP address in your WSDL file

Save your WSDL file

Install the npm soap library

‍Working examples of connecting to the API

Get adom list

Get Device List

Get Device Vdom list

List FAZ generated reports

Run FAZ report

Search FAZ logs

Tips and pointers

See the xml request you sent

Dynamically pass variables to your search FAZ logs function

More about me at | Want to hire me for a one-on-one session?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store