The base URL of the panel API.
The API key for authentication.
Optional
customHeaders: Record<string, string>Optional custom headers to include in requests.
create a server
Server Data for creation
Create a new database
POST /api/application/servers/{id}/databases
server id
database details
database
Create a new user
import { api } from "./ApplicationApi.example";
// create a user
const userData = {
email: "test@example.com", // email of the user
username: "test", // username of the user
first_name: "test", // first name of the user
last_name: "example", // last name of the User
password: "example" // (optional) password of the user
}
api.createUser(userData).then(data => {
console.log(data) // log the output
})
.catch(err => {
console.error(err) // log error if occurs
})
User creation data
Delete a server
DELETE /api/application/servers/{id}
server id
force delete server (may damage wings)
boolean
delete a database from server
DELETE /api/application/servers/{id}/databases/{dbID}
server id
database id
boolean
Delete a user by ID
import { api } from "./ApplicationApi.example";
api.deleteUser(1 /* user id */).then(data => {
if(data) {
console.log("user 1 deleted successfully")
} else {
console.error("failed to delete user 1")
}
}).catch(err => {
console.error("error deleting user 1", err)
})
User ID
get all nests
additional options
Get all Servers
Optional
filter: stringset a filter
Optional
value: anyset value of the filter
Get all users from panel
import { api } from "./ApplicationApi.example" // import the class from the file
// fetch all users from panel
api.getAllUser().then(data => {
console.log(data) // log output data
}).catch(err => {
console.error(err) // log error if occurs
})
get a nest
nest id
Retrieve detailed information about a specific server.
Server Id
Optional
include: stringInclude relationships (allocations, user, subusers, pack, nest, egg, variables, location, node, databases, backups)
Get a user by email
import { api } from "./ApplicationApi.example" // import the class from the file
// fetch user by there email from panel
api.getAUserByEmail("test@example.com").then(data => {
console.log(data) // log output data
}).catch(err => {
console.error(err) // log error if occurs
})
User's email
Get a user by ID
import { api } from "./ApplicationApi.example";
// get a user by there id from panel
api
.getAUserById(1)
.then((data) => console.log(data) /*Log the data*/)
.catch((err) => console.error(err) /*log if any error occurs */);
User's ID
Get a user by username
import { api } from "./ApplicationApi.example";
// get a user by there username from panel
api
.getAUserByUsername("example")
.then((data) => console.log(data) /*Log the data*/)
.catch((err) => console.error(err) /*log if any error occurs */);
User's username
get a server's database details
GET /api/application/servers/{id}/databases/{dbId}
server id
database id
database details
get corresponding server databases
GET /api/application/servers/{id}/databases
server id
server databases
Reinstall the corresponding server
POST /api/application/servers/{id}/reinstall
Server Id
boolean
Suspend a server
Server id
Remove suspension from a server to allow it to start.
Server id
Update Server Build Configuration Update server resource limits and feature limits.
PATCH /api/application/servers/{server}/build
Server ID
Build configuration object
Updated server object
update server database details
PATCH /api/application/servers/{id}/databases/{dbID}
server id
database id
data to be updated
database details
Updates a server's details via the panel API.
The ID of the server to update.
An object containing the updated server fields.
The updated server object.
Updates server start up settings
PATCH /api/application/servers/{id}/startup
Server id
updated server start up settings
updated Server setting data
Update a user
import { api } from "./ApplicationApi.example";
// update a user details
const updatedData = {
// data to be updated
first_name: "example",
};
api
.updateUser(
1, // user id
updatedData
)
.then((data) => console.log(data))
.catch((err) => {
console.log(err);
});
User ID
Fields to update
Example
Author
nehxurai