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 the list of available preset groups. |
info | get info | Returns detailed information about a specific preset including pricing, availability, and tags. |
list | get list of presets | Returns a list of all available presets. If a valid token is provided, the 'total' field is removed from each preset object for public access. |
search | get search results | Search appropriate servers for a specific preset by name, filtering by scope (free or all) and location. |
show | get preset details | Returns the configuration and pricing details of a specific preset by its ID. |
presets/groups¶
Returns the list of available preset groups.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: groups |
| token | ✅ | string | Authentication token |
Example Request
Example of a successful response
presets/info¶
Returns detailed information about a specific preset including pricing, availability, and tags.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Action name |
| token | ❌ | string | Authentication token |
| id | ❌ | integer | Preset ID |
Example of a successful response
presets/list¶
Returns a list of all available presets. If a valid token is provided, the 'total' field is removed from each preset object for public access.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: list |
| token | ❌ | string | Authentication token to check customer permissions |
Example of a successful response
{
"result": "OK",
"action": "list",
"presets": [
{
"id": 101,
"name": "Standard VPS",
"cpu": 2,
"ram": 4096,
"hdd": 51200,
"gpu": 0,
"virtual": 1,
"monthly_ru": 500.0,
"monthly_com": 15.0,
"monthly_usd": 18.5,
"price": {
"EUR": 16.5,
"USD": 18.5
},
"locations": [
"NL",
"DE"
],
"description": "High performance VPS instance",
"available": 0,
"total": 0,
"server_type": "Instant Server",
"tags": []
}
]
}
presets/search¶
Search appropriate servers for a specific preset by name, filtering by scope (free or all) and location.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | The action to perform |
| token | ✅ | string | Authentication token |
| name | ❌ | string | Name of the preset to search for |
Example Request
Example of a successful response
{
"result": "OK",
"action": "search",
"servers": [
{
"id": 1,
"server_id": 1,
"type": "ref_tableName",
"owner": "owner",
"status": "Condition_Component",
"location": "dataCenterLocation.Code",
"config": "hwconfig",
"full_location": "Rack1.description-pos-id",
"ip": "IpAdress2.ip",
"days_left": 0,
"due_date": "string"
}
]
}
presets/show¶
Returns the configuration and pricing details of a specific preset by its ID.
HTTP Method: POST|GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | The action to perform |
| token | ❌ | string | Authentication token |
| id | ❌ | integer | The ID of the preset to show |
Example Request
Example of a successful response
{
"result": "OK",
"action": "show",
"data": [
{
"id": 123,
"name": "High Performance Preset",
"description": "Optimized for heavy workloads",
"cpu": 4,
"ram": 8,
"hdd": 100,
"internal": 50,
"gpu": "NVIDIA RTX 3060",
"virtual": true,
"locations": [
"NL",
"DE"
],
"regions": {
"Code": "10+"
},
"monthly_ru": 2500.0,
"monthly_com": 45.99,
"monthly_usd": 52.5,
"price": {
"RUB": 2500.0,
"EUR": 45.99,
"USD": 52.5
},
"tags": [
{
"id": 1,
"name": "gaming"
}
],
"server_type": "Instant Server"
}
]
}