How to use the Multiserver API
In this article, you'll learn how to use the Multiserver API to create, destroy, edit & manage
your Multiserver service. You are able to use this API to create a Reseller hosting service! You could use the Pterodactyl API HERE to create your own front end panel and use WitherHosting's Quality Ryzen and Intel Hardware!
Using the API to get Server Types
Getting the egg ID's is important to creating a service because it allows you to select what type of service you want. For example the ID for creating a PaperMC server is 4
. We suggest using the website https://reqbin.com/post-online to test out the API.
The call to retrieve the server types is https://witherpanel.com/api/client/cloudservers/getoptions
the response from the API on a successful use will look like this:
`{
"id": 4,
"name": "Paper",
"status": "1",
"eggid": "65"
}`
The only part that will matter is the "id": 4
🌍 Getting available locations using the API 🌍
Use this API call https://witherpanel.com/api/client/cloudservers/getlocationstock
the response will look like this:
`{
"id": 1,
"long": "New York City",
"oos": 0
}`
There are two parts of this that matter, "id": 1
and "oos": 0
- ID -> This is the ID of the location and is required when creating a server.
- OOS -> This stands for
Out Of Stock
0
Means In Stock2
Means Low Stock (Low Stock means that there is a chance the server could fail to create due to size)1
Means Out Of Stock➕ Creating a server using the Mulitserver API ➕
The API Endpoint is https://witherpanel.com/api/client/cloudservers/create
Required Inputs
Name: Name of the server
memory: Amount of Ram on the server
cpu: Amount of CPU on the server
disk: Amount of STORAGE on the server
type: Server Type ID
location: Server Location ID
The content required to create a server for example would look like
{"name": "Multiserver API!!", "memory": "1024", "cpu": "200", "disk": "5000", "type": "4", "location": "1"}
In that we have created a server that will have, 1GB of ram 2vCores and 5GB of storage using the Java server software Paper in our NYC location
3
and Backups are set to 5
✏️ Editing a server using the API ✏️
The API Endpoint is https://witherpanel.com/api/client/cloudservers/edit
Required Inputs
UUID: Servers UUID (Found in the settings page)
memory: New Ram Amount
cpu: New CPU amount
disk: New Disk amount
The content required will look like:
{"uuid": "Your servers UUID", "memory": "1024", "cpu": "200", "disk": "5000"}
That will modify your servers setup!
➖ Deleting a server using the API ➖
Required Inputs
UUID: Servers UUID
Content required will look like this
{"uuid": "Your servers UUID"}
This will delete your server and give back your resources!
Updated on: 06/08/2024
Thank you!