Socket
Socket
Sign inDemoInstall

dashserv.io

Package Overview
Dependencies
7
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dashserv.io

The official Api Wrapper for www.dashserv.io


Version published
Weekly downloads
1
Maintainers
1
Install size
522 kB
Created
Weekly downloads
 

Readme

Source

Built with Love Made with Javascript

Discord server NPM version NPM downloads Get Started Now

npm installnfo

dashserv.io

This is an API Wrapper for the API of dashserv.io It uses promises, so you can await the functions or .then().catch() them!

Installation

npm install dashserv.io@latest
const DashServApi = require("dashserv.io");
const DashServ = new DashServApi("API-TOKEN");

// get all your Servers:
DashServ.vServer.getAll() 
  .catch(console.error) // don't forget to catch errors!
  .then(console.log);
// start Server:
DashServ.vServer.start() 
  .catch(console.error) // don't forget to catch errors!
  .then(console.log);
// stop Server:
DashServ.vServer.shutdownServer() 
  .catch(console.error) // don't forget to catch errors!
  .then(console.log);

📫 Join Discord Server for Support


🗂 For more help view Documentation

Get an API-Token here

// way of awaiting something...

const DashServApi = require("dashserv.io");
const DashServ = new DashServApi("API-TOKEN");
(async() => {
  try {
    // get all your Servers:
    const data = await DashServ.vServer.getAll() 
    console.log(data);
  } catch (error) {
    console.error(error);
  }
})();

Methods:

Order / Product

// Currently - none

Dedicated Servers

// Currently - none

V-Servers

// PROPERTY: Shows all validActions
DashServ.vServer.validActions
/**
 * METHODS:
*/
// Lists all vservers in your account
await DashServ.vServer.getAll(); 
// Lists a the single vserver
await DashServ.vServer.getServerData(ServerId);
// List all available images
await DashServ.vServer.getAvailableImages();
// Show Status of a Vserver
await DashServ.vServer.getStatus(ServerId);
// Changes the Resources of cpu, ram and disk amount, if configurated server (+- € + autorestarts)
await DashServ.vServer.changeResource(ServerId, newCpuAmount, newRamAmount, newDiskAmount);
// Starts the Server
await DashServ.vServer.startServer(ServerId);
// shutdowns the Server
await DashServ.vServer.shutdownServer(ServerId);
// stops the Server
await DashServ.vServer.stopServer(ServerId);
// restart the Server
await DashServ.vServer.restartServer(ServerId);
// Resets a Server to default image
await DashServ.vServer.forceResetServer(ServerId);
// reinstalls the server and restarts it with the new image
await DashServ.vServer.reinstallServer(ServerId, image);
// resets the root password
await DashServ.vServer.resetPassword(ServerId);
// Shows all backups
await DashServ.vServer.listBackups(ServerId);
// Creates a backup with a custom name
await DashServ.vServer.createBackup(ServerId, name);
// deletes a created backup with a backup id
await DashServ.vServer.deleteBackup(ServerId, backupUuid);
// restores a backup of a backup id and restarts the server
await DashServ.vServer.restoreBackup(ServerId, backupUuid);
// get all tasks
await DashServ.vServer.getTasks(ServerId);
// get all scheduled tasks
await DashServ.vServer.getScheduledTasks(ServerId);
// create a scheduled task, with a interval and a command (and a optimal nextexecution : timestamp)
await DashServ.vServer.createScheduledTask(ServerId, interval, command, nextexecution[optionial]);
// delete a scheduled task
await DashServ.vServer.deleteScheduledTask(ServerId, taskuuid);
// get all Graphs of a specific timeframe!
await DashServ.vServer.getGraphs(ServerId, timeframe);

Keywords

FAQs

Last updated on 01 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc