Expose ASUSTOR NAS functionality via REST API. This application was develop as a part of VMware VM backup automation system that help create backup destination folder on NAS storage and backup from NAS storage into USB drives. The documentation for this API can be found here
- Currently doesn't support HTTPS
- Only support API Key authentication
To install this application, the following requirements needs to be met
- Node.js ^6.9.1
- npm ^3.10.8
- internet connection
once all the requirements are me, you can clone this repository using the following command
git clone https://github.com/rimaulana/asustor-nas-api.git
If you don't have git on your system, you can also get the files by downloading the latest release on our release page, then extract it.
once the codes were downloaded, cd into asustor-nas-api directory and then run
npm install --only=prod
All application configurations are saved in application root folder and should be named config.json which by default doesn't exist. You need to create this file in order for this application to work. Below is the example of config.json file
{
"api_keys": [
"key1","key2","key3"
],
"server_port": 3000,
"slack_webhook": "webhook_code"
}
This array is a collections of allowed API keys used to authenticate a request.
By default application will use port 3000 unless you say otherwise on this section. All optional settings doesn't need to be declared when it is not used
Integration with slack where application loggin will be sent to slack. More information regarding slack incoming webhook can be read over here. All optional settings doesn't need to be declared when it is not used
To run the service simply run
npm run server