os.php¶
OS management module for listing available operating systems, searching servers by OS ID, and managing OS presets.
API Methods¶
| Method | Action | Description |
|---|---|---|
list | get list of OS | Returns a list of available operating systems, potentially filtered by server hardware configuration or instance presets. |
search | search servers by OS | Searches for available servers that can run a specific operating system. |
os/list¶
Returns a list of available operating systems, potentially filtered by server hardware configuration or instance presets.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: list |
| token | ❌ | string | Authentication token for permission verification. |
| id | ❌ | integer | Server ID to filter OS by hardware configuration. |
| instance_id | ❌ | integer | Instance preset ID to filter OS by preset requirements. |
| location | ❌ | string | Specific data center location code. |
| user_location | ❌ | string | The user's current or preferred geographic location. |
| bill_period | ❌ | string | The billing cycle duration for the operating system. |
Success response example
{
"result": "OK",
"action": "list",
"os_list": [
{
"id": 101,
"name": "Ubuntu 22.04 LTS",
"active": 1,
"price_EUR": 5.5,
"billing_plan": {
"USD": "...",
"EUR": "...",
},
"bm": 0,
"vm": 1,
"gpu": 0,
"vgpu": 0,
"vds": 0,
"cores": 2,
"cpu_sockets": 1,
"ram": 4096,
"hdd": 50,
"location": "NL",
"allow_test_os": true,
"disable_only": false,
"email": "[email protected]",
"exclude_list": "",
"tags": []
}
],
"os_excluded": [
{
"os_id": 105,
"name": "Windows Server 2022",
"foreman_id": 456,
"reason": "OS is excluded by hardware configuration of all available servers"
}
]
}
os/search¶
Searches for available servers that can run a specific operating system.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: search |
| token | ❌ | string | Authentication token for permission verification. |
| os_id | ✅ | integer | The ID of the operating system to search for. |
Request example