Api key to use
A custom function to handle errors
Fast login (No credential check)
This method is only available if auto-assign is enabled
const res = await client.assignAllocation('c2f5a3b6') // res = Allocation
client.assignAllocation('c2f5a3b6').then((res) => console.log(res)) // res = Allocation
ID of the server to get (In the settings tab of server/in link)
Returns a archive file information
const res = await client.compressFile('c2f5a3b6', { root: '/', files: ['README.md', 'LICENSE'] }) // res = ServerFileAttributes
client.compressFile('c2f5a3b6', { root: '/', files: ['README.md', 'LICENSE'] }).then((res) => console.log(res)) // res = ServerFileAttributes
ID of the server to get (In the settings tab of server/in link)
An object composed of root of the file and array of objects for files to rename
If successful returns Successfuly copied!
const res = await client.copyFile('c2f5a3b6', '/LICENSE') // res = Successfuly copied!
client.copyFile('c2f5a3b6', '/dist/LICENSE').then((res) => console.log(res)) // res = Successfuly copied!
ID of the server to get (In the settings tab of server/in link)
Location of file to copy (e. g. /LICENSE) (It will create a /LICENSE copy)
The new api key information + meta (token)
const res = await client.createApiKey('TESTING', []) // res = ApiKey + meta (token)
client.createApiKey('TESTING', []).then((res) => console.log(res)) // res = ApiKey + meta (token)
Api key description
Array of allowed IP addresses (default empty [])
Backup information
const res = await client.createBackup('7e74354d') // res = BackupAttributes
client.createBackup('7e74354d', 'RandomBackup').then((res) => console.log(res)) // res = BackupAttributes
ID of the server to get (In the settings tab of server/in link)
Name of the backup
Ignored files / folders
Returns new database information (DatabaseAttributes)
const res = await client.createDatabase('c2f5a3b6', 'Information') // res = DatabaseAttributes
client.createDatabase('c2f5a3b6', 'info').then((res) => console.log(res)) // res = DatabaseAttributes
ID of the server to get (In the settings tab of server/in link)
Database name
Connections allowed from
Optional
options: DatabaseIncludeInputInclude information about relationships
If successful returns Successfuly created!
const res = await client.createFolder('c2f5a3b6', { root: '/', name: 'world' }) // res = Successfuly created!
client.createFolder('c2f5a3b6', { root: '/', name: 'world' }).then((res) => console.log(res)) // res = Successfuly created!
ID of the server to get (In the settings tab of server/in link)
An object composed of root of the file and file to remove
The schedule information
const res = await client.createSchedule('TESTING', '*', '*', '*', '*') // res = ScheduleAttributes
client.createSchedule('TESTING', '*', '*', '*', '*').then((res) => console.log(res)) // res = ScheduleAttributes
ID of the server to get (In the settings tab of server/in link)
Name of the schedule
Cron minute syntax
Cron hour syntax
Cron day of month syntax
Cron month syntax
Cron day of week syntax
Whether the schedule should be activated on creation (default true)
Whether the schedule should only run when server is on (default true)
SubUserAttributes
const res = await client.createSubUser('c2f5a3b6', 'api@gmail.com', ['control.console']) // res = SubUserAttributes
client.createSubUser('c2f5a3b6', 'api@gmail.com', ['control.console']).then((res) => console.log(res)) // res = SubUserAttributes
ID of the server to get (In the settings tab of server/in link)
Email of the subuser
If successful returns Successfuly decompressed!
const res = await client.decompressFile('c2f5a3b6', { root: '/', file: 'archive.tar.gz' }) // res = Successfuly decompressed!
client.decompressFile('c2f5a3b6', { root: '/', file: 'archive.tar.gz' }).then((res) => console.log(res)) // res = Successfuly decompressed!
ID of the server to get (In the settings tab of server/in link)
An object composed of root of the file and file to remove
This method is only available if allocation is not primary
const res = await client.deleteAllocation('c2f5a3b6', 1) // res = Sucessfully deleted Allocation!
client.deleteAllocation('c2f5a3b6', 1).then((res) => console.log(res)) // res = Sucessfully deleted Allocation!
ID of the server to get (In the settings tab of server/in link)
ID of the allocation to delete
If succesful returns Successfully deleted api key!
const res = await client.deleteApiKey('NWKMYMT2Mrav0Iq2') // res = Successfully deleted api key!
client.deleteApiKey('NWKMYMT2Mrav0Iq2').then((res) => console.log(res)) // res = Successfully deleted api key!
The api keys identifier code
Backup information
const res = await client.deleteBackup('7e74354d', '3a4e4b2a') // res = Backup successfully deleted!
client.deleteBackup('7e74354d', '3a4e4b2a').then((res) => console.log(res)) // res = Backup successfully deleted!
ID of the server to get (In the settings tab of server/in link)
ID of the backup to delete
If successful returns Sucesfully deleted!
const res = await client.deleteDatabase('c2f5a3b6', 's5_info') // res = Sucesfully deleted!
client.deleteDatabase('c2f5a3b6', 's3_good').then((res) => console.log(res)) // res = Sucesfully deleted!
ID of the server to get (In the settings tab of server/in link)
Database id
If successful returns Successfuly deleted!
const res = await client.deleteFile('c2f5a3b6', { root: '/', files: ['README.md'] }) // res = Successfuly deleted!
client.deleteFile('c2f5a3b6', { root: '/', files: ['LICENSE', 'README.md'] }).then((res) => console.log(res)) // res = Successfuly deleted!
ID of the server to get (In the settings tab of server/in link)
An object composed of root of the file and array of string (file names) for files to rename
If successful returns Successfuly deleted SubUser!
const res = await client.deleteSubUser('c2f5a3b6', '60a7aec3-e17d-4aa9-abb3-56d944d204b4') // res = Successfuly deleted SubUser!
client.deleteSubUser('c2f5a3b6', '60a7aec3-e17d-4aa9-abb3-56d944d204b4').then((res) => console.log(res)) // res = Successfuly deleted SubUser!
ID of the server to get (In the settings tab of server/in link)
UUID of the subuser to get
The schedule information
const res = await client.editSchedule('7e74354d', 5, { name: 'EditedName' }) // res = ScheduleAttributes
client.editSchedule('7e74354d', 5, { name: 'EditedName' }).then((res) => console.log(res)) // res = ScheduleAttributes
ID of the server to get (In the settings tab of server/in link)
Id of the schedule to edit
Edit schedule options
Tokens
const res = await client.enable2FA('505134') // res = string[] (tokens)
client.enable2FA('505134').then((res) => console.log(res)) // res = string[] (tokens)
The code from authenticator
Private
errorA custom function to handle errors
TOTP QR code image url (otpauth)
const res = await client.getAccountInfo() // res = string (otpauth)
client.getAccountInfo().then((res) => console.log(res)) // res = string (otpauth)
Account information
const res = await client.getAccountInfo() // res = UserAttributes
client.getAccountInfo().then((res) => console.log(res)) // res = UserAttributes
Array of allocations
const res = await client.getAllAlocations('c2f5a3b6') // res = Allocation[]
client.getAllAlocations('c2f5a3b6').then((res) => console.log(res)) // res = Allocation[]
ID of the server to get (In the settings tab of server/in link)
An array of backups
const res = await client.getAllBackups('7e74354d') // res = Backup[]
client.getAllBackups('7e74354d').then((res) => console.log(res)) // res = Backup[]
ID of the server to get (In the settings tab of server/in link)
Returns array of servers databases (Database[])
const res = await client.getAllDatabases('c2f5a3b6') // res = Database[]
client.getAllDatabases('c2f5a3b6').then((res) => console.log(res)) // res = Database[]
ID of the server to get (In the settings tab of server/in link)
Optional
options: DatabaseIncludeInputInclude information about relationships
Array of file objects
const res = await client.getAllFiles('c2f5a3b6') // res = ServerFile[]
client.getAllFiles('c2f5a3b6', 'dist').then((res) => console.log(res)) // res = ServerFile[]
ID of the server to get (In the settings tab of server/in link)
Directory to get files from (if not provided gets root server dir) (e. g. dist or dist/classes)
Permission data
Just returns all available permissions. Not that useful!
const res = await client.getPermissions() // res = Permissions
client.getPermissions().then((res) => console.log(res)) // res = Permissions
An Array of servers schedules
const res = await client.getAllSchedules() // res = Schedule[]
client.getAllSchedules().then((res) => console.log(res)) // res = Schedule[]
ID of the server to get (In the settings tab of server/in link)
An Array of servers
const res = await client.getAllServers() // res = Server[]
client.getAllServers().then((res) => console.log(res)) // res = Server[]
Optional
options: ServerIncludeInputInclude information about server relationships
Optional
filter: ServerFilterInputFilter servers by specified field and value
SubUser[]
const res = await client.getAllSubUsers('c2f5a3b6') // res = SubUser[]
client.getAllSubUsers('c2f5a3b6').then((res) => console.log(res)) // res = SubUser[]
ID of the server to get (In the settings tab of server/in link)
Returns backup download url
const res = await client.getBackupDownloadLink('7e74354d', '3a4e4b2a') // res = url (string)
client.getBackupDownloadLink('7e74354d', '3a4e4b2a').then((res) => console.log(res)) // res = url (string)
ID of the server to get (In the settings tab of server/in link)
ID of the backup to get
Backup information
const res = await client.getBackupInfo('7e74354d', '3a4e4b2a') // res = BackupAttributes
client.getBackupInfo('7e74354d', '3a4e4b2a').then((res) => console.log(res)) // res = BackupAttributes
ID of the server to get (In the settings tab of server/in link)
ID of the backup to get
Contents of the file (string)
const res = await client.getFileContents('c2f5a3b6', 'index.js') // res = content of your file (string)
client.getFileContents('c2f5a3b6', 'dist/index.js').then((res) => console.log(res)) // res = content of your file (string)
ID of the server to get (In the settings tab of server/in link)
File to get the contents of (full name like index.js or dist/index.js)
Returns file download url
const res = await client.getFileDownloadLink('c2f5a3b6', 'index.js') // res = url (string)
client.getServerResources('c2f5a3b6', 'dist/index.js').then((res) => console.log(res)) // res = url (string)
ID of the server to get (In the settings tab of server/in link)
File to get the contents of (full name like index.js or dist/index.js)
If successful returns upload url
const res = await client.getFileUploadLink('c2f5a3b6') // res = url (string)
client.getFileUploadLink('c2f5a3b6').then((res) => console.log(res)) // res = url (string)
ID of the server to get (In the settings tab of server/in link)
Schedule information
const res = await client.getScheduleInfo('7e74354d', 7) // res = ScheduleAttributes
client.getScheduleInfo('7e74354d', 8).then((res) => console.log(res)) // res = ScheduleAttributes
ID of the server to get (In the settings tab of server/in link)
Id of the schedule to get info
Server information
const res = await client.getServerInfo('c2f5a3b6') // res = ServerAttributes
client.getServerInfo('c2f5a3b6').then((res) => console.log(res)) // res = ServerAttributes
ID of the server to get (In the settings tab of server/in link)
Optional
options: ServerIncludeInputInclude information about server relationships
Server resource usage object
const res = await client.getServerResources('c2f5a3b6') // res = ServerResources
client.getServerResources('c2f5a3b6').then((res) => console.log(res)) // res = ServerResources
ID of the server to get (In the settings tab of server/in link)
SubUserAttributes
const res = await client.getSubUserInfo('c2f5a3b6', '60a7aec3-e17d-4aa9-abb3-56d944d204b4') // res = SubUserAttributes
client.getSubUserInfo('c2f5a3b6', '60a7aec3-e17d-4aa9-abb3-56d944d204b4').then((res) => console.log(res)) // res = SubUserAttributes
ID of the server to get (In the settings tab of server/in link)
UUID of the subuser to get
Private
hostPanels address
Private
keyApi key to use
Successfuly started reinstalling!
const res = await client.reinstallServer('c2f5a3b6') // res = Successfuly started reinstalling!
client.reinstallServer('c2f5a3b6').then((res) => console.log(res)) // res = Successfuly started reinstalling!
ID of the server to get (In the settings tab of server/in link)
If successful returns Successfuly renamed!
const res = await client.renameFile('c2f5a3b6', { root: '/', files: [{ from: 'LICENSE', to: 'LIC' }] }) // res = Successfuly renamed!
client.renameFile('c2f5a3b6', { root: '/dist', files: [{ from: 'LICENSE', to: 'LIC' }] }).then((res) => console.log(res)) // res = Successfuly renamed!
ID of the server to get (In the settings tab of server/in link)
An object composed of root of the file and array of objects for files to rename
Successfuly set new server name!
const res = await client.renameServer('c2f5a3b6', 'Best Server') // res = Successfuly set new server name!
client.renameServer('c2f5a3b6', 'Best Server').then((res) => console.log(res)) // res = Successfuly set new server name!
ID of the server to get (In the settings tab of server/in link)
New name for the server
Sucessfully restored backup
const res = await client.restoreBackup('7e74354d', '3a4e4b2a') // res = Sucessfully restored backup
client.restoreBackup('7e74354d', '3a4e4b2a').then((res) => console.log(res)) // res = Sucessfully restored backup
ID of the server to get (In the settings tab of server/in link)
ID of the backup to restore
Whether to remove all files before restoring backup
Returns database information + Relationships(password)
const res = await client.rotateDatabasePass('c2f5a3b6', 's5_info') // res = DatabaseAttributesRelationship
client.rotateDatabasePass('c2f5a3b6', 's3_good').then((res) => console.log(res)) // res = DatabaseAttributesRelationship
ID of the server to get (In the settings tab of server/in link)
Database id
If successful returns Successfuly sent the command!
const res = await client.sendCommand('c2f5a3b6', 'give Linux123123 star') // res = Successfuly sent the command!
client.sendCommand('c2f5a3b6', 'give Linux123123 star').then((res) => console.log(res)) // res = Successfuly sent the command!
ID of the server to send a command to
Command to send
const res = await client.setAllocationNote('c2f5a3b6', 1, "Port for RDP") // res = Allocation
client.setAllocationNote('c2f5a3b6', 1, "Port for RDP").then((res) => console.log(res)) // res = Allocation
ID of the server to get (In the settings tab of server/in link)
ID of the allocation to set the note for
The note you want to set
const res = await client.setAllocationPrimary('c2f5a3b6', 1) // res = Allocation
client.setAllocationPrimary('c2f5a3b6', 1).then((res) => console.log(res)) // res = Allocation
ID of the server to get (In the settings tab of server/in link)
ID of the allocation to make primary
If successful returns Successfuly set power state!
const res = await client.setPowerState('c2f5a3b6', 'start') // res = Successfuly set power state!
client.setPowerState('c2f5a3b6', 'kill).then((res) => console.log(res)) // res = Successfuly set power state!
ID of the server to send a command to
start / stop / restart / kill
This method is used to connect to server websocket and have automatic authentication. This exposes the websocket client.
WebsocketClient
const res = await client.startConsoleConnection('c2f5a3b6') // res = WebsocketClient
client.startConsoleConnection('c2f5a3b6').then((res) => console.log(res)) // res = WebsocketClient
ID of the server to get (In the settings tab of server/in link)
Backup information
const res = await client.toggleLockBackup('7e74354d', '3a4e4b2a') // res = BackupAttributes
client.toggleLockBackup('7e74354d', '3a4e4b2a').then((res) => console.log(res)) // res = BackupAttributes
ID of the server to get (In the settings tab of server/in link)
ID of the backup to toggle lock of
If succesful returns Successfully updated email!
const res = await client.updateEmail('jspteroapi@linux123123.cf', 'verySecurePass') // res = Successfully updated email!
client.updateEmail('jspteroapi@linux123123.cf', 'verySecurePass').then((res) => console.log(res)) // res = Successfully updated email!
The new email address
The password of the user
If succesful returns Successfully updated password!
const res = await client.updatePassword('verySecurePass', 'moreSecurePass') // res = Successfully updated password!
client.updatePassword('verySecurePass', 'moreSecurePass').then((res) => console.log(res)) // res = Successfully updated password!
The currect passowrd
The new password
SubUserAttributes
const res = await client.updateSubUserPermissions('c2f5a3b6', '60a7aec3-e17d-4aa9-abb3-56d944d204b4', ['control.console']) // res = SubUserAttributes
client.updateSubUserPermissions('c2f5a3b6', '60a7aec3-e17d-4aa9-abb3-56d944d204b4', ['control.console']).then((res) => console.log(res)) // res = SubUserAttributes
ID of the server to get (In the settings tab of server/in link)
UUID of the subuser to get
If successful returns Successfuly written the file!
const res = await client.writeFile('c2f5a3b6', 'HW.txt', 'Hello world!') // res = Successfuly written the file!
client.writeFile('c2f5a3b6', 'dist/HW.txt', 'Hello world!').then((res) => console.log(res)) // res = Successfuly written the file!
ID of the server to get (In the settings tab of server/in link)
File to get the contents of (full name like index.js or dist/index.js)
The contents of file you want to write
Generated using TypeDoc
Panels address