Skip to content

presets.php

Preset management module for handling server configurations, including listing, searching, and retrieving group information.

API Methods

Method Action Description
groups get groups Returns a list of preset groups.
info get info Returns a list of presets with specified currencies.
list get list Returns a list of available presets filtered by location.
search get search results Searches for appropriate servers matching a specific preset name.
show get show details Returns detailed information for a specific preset.

presets/groups

Returns a list of preset groups.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: groups

Request example

curl -s "https://invapi.hostkey.com/presets.php" -X POST \
--data "action=groups"
Success response example
{
"result": "OK",
"action": "groups",
"data": [
{
"id": 1,
"name": "Standard Group"
},
{
"id": 2,
"name": "High Performance Group"
}
]
}
Error examples
{
"code": -1,
"message": "Error description"
}

presets/info

Returns a list of presets with specified currencies.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: info
currencies ❌ string List of currencies to display. Allowed values: EUR.

Request example

curl -s "https://invapi.hostkey.com/presets.php" -X POST \
--data "action=info"
Success response example
{
"result": "OK",
"action": "info",
"presets": [
{
"id": 10,
"name": "Basic Preset",
"price": {
"EUR": 25.0,
}
}
]
}
Error examples
{
"code": -1,
"message": "Error description"
}

presets/list

Returns a list of available presets filtered by location.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: list
token ✅ string API-токен аутентификации
location ❌ string Location identifier or zone to filter presets.

Request example

curl -s "https://invapi.hostkey.com/presets.php" -X POST \
--data "action=list" \
--data "token=HOSTKEY_TOKEN"
Success response example
{
"result": "OK",
"action": "list",
"presets": [
{
"id": 101,
"name": "Standard VPS",
"available": 5,
"price": {
"EUR": 15.0,
},
"tags": [
{
"id": 1,
"name": "ssd"
}
],
"total": 10,
"server_type": "Virtual Private Server"
}
]
}
Error examples
{
"code": -1,
"message": "$module/$action error: {$presets['error']}"
}

presets/search

Searches for appropriate servers matching a specific preset name.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: search
token ✅ string API-токен аутентификации
name ✅ string Preset name to search for servers.
scope ❌ string Scope of servers. Allowed values: free
location ❌ string Location identifier for the search.

Request example

curl -s "https://invapi.hostkey.com/presets.php" -X POST \
--data "action=search" \
--data "token=HOSTKEY_TOKEN" \
--data "name=VALUE"
Success response example
{
"result": "OK",
"action": "search",
"servers": [
{
"id": 501,
"name": "Server-01",
"status": "active",
"days_left": 30,
"due_date": "2024-12-31"
}
]
}
Error examples
{
"code": -1,
"message": "Error description"
}

presets/show

Returns detailed information for a specific preset.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: show
token ✅ string API-токен аутентификации
id ❌ integer The unique identifier of the preset to be shown.
name ❌ string The name of the preset to search for.
limit ❌ integer Maximum number of results to return.
web_ip ❌ string The IP address of the web server.

Request example

curl -s "https://invapi.hostkey.com/presets.php" -X POST \
--data "action=show" \
--data "token=HOSTKEY_TOKEN"
Success response example
{
"result": "OK",
"action": "show",
"presets": [
{
"id": 10,
"name": "Premium Preset",
"description": "High performance configuration",
"cpu": "4 Cores",
"ram": 8,
"hdd": 160,
"gpu": "NVIDIA T4",
"active": true
}
]
}
Error examples
{
"code": -1,
"message": "JSON encode failed"
}
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×