presets.php¶
Server preset management module: retrieving lists, grouping, searching for suitable servers, and detailed configuration information with prices in different currencies.
API Methods¶
| Method | Action | Description |
|---|---|---|
groups | get groups | Returns a list of available preset groups |
info | get info | Returns a list of available currencies for displaying preset prices |
list | get preset list | Returns a list of available presets, considering location and user permissions |
search | search servers by preset | Returns a list of suitable servers based on the preset name, scope (free/all), and location |
show | get preset info | Returns detailed information about a specific preset by its ID or name, taking into account restrictions for certain regions and payment parameters. |
presets/groups¶
Returns a list of available preset groups
HTTP-method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Action name: groups |
| token | ❌ | string | Authorization token |
Example of a successful response
Failure response
``` { "code": -1, "message": "Error getting groups" }
```
presets/info¶
Returns a list of available currencies for displaying preset prices
HTTP-method: GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: info |
| token | ❌ | string | Authorization token |
| currencies | ❌ | string | List of currencies separated by commas (e.g.: USD,EUR) |
Failure response
``` { "code": -1, "message": "Action required" }
```
presets/list¶
Returns a list of available presets, considering location and user permissions
HTTP-method: GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: list |
| token | ❌ | string | Authorization token |
| location | ❌ | string | Location code (e.g., NL) |
Example of a successful response
Failure response
``` { "code": -1, "message": "presets/list error: no presets found" }
```
presets/search¶
Returns a list of suitable servers based on the preset name, scope (free/all), and location
HTTP-method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: search |
| token | ✅ | string | Authorization token |
| name | ✅ | string | Preset name |
| scope | ❌ | string | Scope (free/all) |
| location | ❌ | string | Server location |
Example Request
Example of a successful response
Failure response
``` { "code": -1, "message": "$module/search: invalid token, logout" }
```
presets/show¶
Returns detailed information about a specific preset by its ID or name, taking into account restrictions for certain regions and payment parameters.
HTTP-method: GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: show |
| token | ❌ | string | User authorization token |
| id | ❌ | integer | Preset ID |
| name | ❌ | string | Preset name |
| limit | ❌ | integer | Results limit |
Example of a successful response
{
"result": "OK",
"action": "show",
"presets": [
{
"id": 123,
"name": "High Performance",
"cpu": "4 Cores",
"ram": 16,
"hdd": 500,
"gpu": "NVIDIA RTX 3080",
"virtual": true,
"description": "Powerful preset for gaming",
"locations": [
"NL",
"DE"
],
"monthly_eur": 45.0,
"monthly_com": 55.0,
"monthly_usd": 60.0,
"hourly_usd": 0.0382,
"hourly_com": 0.0382,
"hourly_eur": 0.41,
"regions": {
"NL": "10+"
},
"server_type": "Instant Server",
"tags": [
{
"id": 1,
"name": "gaming"
}
]
}
]
}
Failure response
``` { "code": -1, "message": "JSON encode failed" }