NetVault offers REST APIs managed Swagger, an open-source suite of API developer tools To obtain the REST API files (Refer the attachment )
To deploy the REST APIs, on a Windows server or a Linux server, complete one of the following procedures.
NOTE: When deploying on Windows, run the command line as Administrator. When deploying on Linux,
execute the commands as root.
To deploy REST APIs on Windows:
1 On the NetVault Server, download and unzip the REST API files.
2 On the NetVault Server, download and install Node.js from https://nodejs.org/en/.
3 If not already installed, download and install NPM from https://npmjs.com/get-npm.
4 If not already installed, download and install Visual Studio Community including "Desktop development with C++" workload. More info https://github.com/nodejs/node-gyp#on-windows
5 Update config.js (for URL, DB_LOCATION, SERVER_PUBLIC_IP, CLI_PATH) present in the API folder.
6 In the root directory of the drive where you installed Node.js, create a folder named “db” (for example,
C:\db).
7 On the command line as Administrator, change to the path that contains the unzipped API files and run the following command:
npm install
8 Start the node server and run the following command:
npm run dev
9 After the server starts, to start using the APIs and view API documentation, open the following Swagger
To deploy REST APIs on Linux:
1 On the NetVault Server, download and unzip the REST API files.
2 On the NetVault Server, download and install Node.js from https://nodejs.org/en/download/ or from the
terminal.
3 If not already installed, download and install NPM according to your Linux distribution.
4 Install Nodemon by running the following command as a superuser on the terminal:
npm install -g nodemon
5 Update config.js (for URL, DB_LOCATION, SERVER_PUBLIC_IP, CLI_PATH) present in the API folder.
6 In the root directory of the drive where Node.js is installed, create a folder named “db” (for example,
/usr/db).
7 On the terminal, change to the path containing the unzipped API files and run the following command:
npm install
8 Run the following command:
export PATH=/usr/netvault/util:$PATH
9 Start the node server and run the following command:
npm run dev
10 After the server starts, open one of the following Swagger links to start using the APIs and view API
documentation:
Getting Started Video for Netvault APIs