Skip to main content

Disk/Traffic API Endpoint

The Disk/Traffic API Endpoint script will provide three API endpoints to your Ultra.cc service. The script provides in total three API endpoints, as shown below.

  • Disk usage stats using quota -s.
  • Traffic stats using app-traffic info.
  • The above combined into one endpoint.

The script will be installed as a Flask application in ~/scripts/Ultra_API and run under a screen session called UltraAPIpoints.

This is an unofficial script that is provided for your convenience. The script is provided as-is and may not be updated or maintained by Ultra.cc. Customers are welcome to use and customize unofficial scripts for their unique needs and requirements. Unofficial support may be offered via Discord only and at the sole discretion of Ultra.cc staff. Use at your own risk.

Installation

  • Connect to your Ultra.cc slot via SSH, see guide here
  • Once connected, execute the following command:
bash <(wget -qO- https://scripts.usbx.me/util/API-EndPoints/main.sh)
  • Type confirm and press ENTER to confirm
  • Press 1 and ENTER to proceed with the installation
    • or, if you have already installed the script, and it is not responding. Press 3 and ENTER to restart the script.
  • Choose an unused application from the list shown, type its name to borrow its port. Press ENTER to confirm
  • Type confirm and press ENTER to confirm
  • After the installation has been successfully completed, the below output should be shown.
    • In your specific output, servername-direct and <PORT> will be replaced with your specific servername and the port of the application you previously chose.
Script has been installed successfully.
 Ultra service API End points to get your service stats:.
  ■ Complete Stats........:  http://servername-direct.usbx.me:<PORT>/get_stats
  ■ Storage Stats.........:  http://servername-direct.usbx.me:<PORT>/get_quota
  ■ Traffic Stats.........:  http://servername-direct.usbx.me:<PORT>/get_bandwidth
The script has been installed.
  • The above URL's are where your API endpoints can be accessed.

Uninstallation

  • Execute the following command:
bash <(wget -qO- https://scripts.usbx.me/util/API-EndPoints/main.sh)
  • Type confirm and press ENTER to confirm
  • Press 2 and ENTER to proceed the uninstallation
  • Press 1 and ENTER to confirm
  • Done!