Skip to content

rimaulana/asustor-nas-api

Repository files navigation

ASUSTOR NAS Rest API

CircleCI codecov codebeat badge Maintainability License: MIT

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

Table of Contents

Limitations

  • Currently doesn't support HTTPS
  • Only support API Key authentication

Installation

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

Configuration File

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"
}

api_keys (mandatory)

This array is a collections of allowed API keys used to authenticate a request.

server_port (optional)

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

slack_webhook (optional)

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

Running the service

To run the service simply run

npm run server

About

Expose ASUSTOR NAS functionality via REST API

Resources

License

Stars

Watchers

Forks

Packages

No packages published