Iso
API Methods¶
| Method | Action | Description |
|---|---|---|
add | add ISO image | Adds a new ISO image or updates an existing one by name. |
delete | delete ISO image | Deletes an ISO image by ID. |
list_iso | get list of ISO images | Returns a list of available ISO images. |
mount_iso | mount ISO image | Mounts an ISO image on the specified server. |
unmount_iso | unmount ISO image | Unmounts an ISO image from the specified server. |
upload | upload ISO image | Uploads an ISO image via URL. |
uploaded | get list of uploaded ISO images | Returns a list of uploaded ISO images for a client or staff member. |
iso/add¶
Adds a new ISO image or updates an existing one by name.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: add |
| token | ✅ | string | Authorization token |
| params[name] | ✅ | string | Full name of the ISO image |
| params[short_name] | ✅ | string | Short name of the ISO image |
| params[iso_name] | ✅ | string | ISO image filename |
| params[private] | ✅ | string | Client email (valid email) |
| params[description] | ❌ | string | Image description |
| params[admin_only] | ❌ | integer | Flag for admin-only access (0 or 1) |
| params[status] | ❌ | string | Image status (default 'Pending') |
Example Request
Example of a successful response
{
"result": "OK",
"action": "add",
"module": "iso",
"data": {
"id": 123,
"name": "Ubuntu 22.04",
"short_name": "ubuntu-22.04",
"iso_name": "ubuntu-22.04.iso",
"private": "[email protected]",
"description": "Ubuntu 22.04 LTS",
"admin_only": 0,
"status": "Pending"
}
}
iso/delete¶
Deletes an ISO image by ID.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: delete |
| token | ✅ | string | Authorization token |
| id | ✅ | int | ID of the ISO image to delete |
Example Request
Example of a successful response
iso/list_iso¶
Returns a list of available ISO images.
HTTP Method: GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: list_iso |
| token | ✅ | string | Authorization token |
| id | ✅ | int | Server ID (required for clients) |
Example Request
Example of a successful response
{
"result": "OK",
"action": "list_iso",
"module": "iso",
"server_id": 456,
"iso_images": [
{
"id": 1,
"iso_name": "ubuntu-22.04.iso",
"url": "https://example.com/ubuntu-22.04.iso",
"description": "Ubuntu 22.04 LTS",
"created_at": "2024-01-15T10:30:00Z"
},
{
"id": 2,
"iso_name": "windows-11.iso",
"url": "https://example.com/windows-11.iso",
"description": "Windows 11 Pro",
"created_at": "2024-01-16T11:45:00Z"
}
]
}
iso/mount_iso¶
Mounts an ISO image on the specified server.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: mount_iso |
| token | ✅ | string | Authorization token |
| id | ✅ | int | Server ID |
| iso | ✅ | string | ISO image name to mount |
Example Request
Example of a successful response
iso/unmount_iso¶
Unmounts an ISO image from the specified server.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: unmount_iso |
| token | ✅ | string | Authorization token |
| id | ✅ | int | Server ID |
Example Request
Example of a successful response
iso/upload¶
Uploads an ISO image via URL.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: upload |
| token | ✅ | string | Authorization token |
| params[url] | ✅ | string | URL for image upload (must end with .iso) |
| params[email] | ❌ | string | Client email (required for staff) |
| params[customer_id] | ❌ | int | Client ID (required for staff) |
Example Request
Example of a successful response
iso/uploaded¶
Returns a list of uploaded ISO images for a client or staff member.
HTTP Method: GET
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: uploaded |
| token | ✅ | string | Authorization token |
| params[email] | ❌ | string | Client email (required for staff) |
Example Request