Iso
API Methods¶
| Method | Action | Description |
|---|---|---|
add | create or update ISO | Adds a new ISO image or updates an existing one by name. Requires administrator privileges. |
del | delete ISO | Deletes an ISO image. Available to administrators and owners of private images. |
delete | delete ISO (alternative) | Alternative method to delete an ISO image by ID. |
history | get history | Returns the history of operations with ISO images. |
list_iso | get ISO list | Returns a list of available ISO images. Server ID is required for clients. |
mount_iso | mount ISO | Mounts an ISO image to the specified server. Returns a task key for tracking. |
unmount_iso | unmount ISO | Unmounts an ISO image from the specified server. Returns a task key. |
update | update ISO | Updates metadata of an existing ISO image. |
upload | upload ISO | Uploads an ISO image via URL. Requires email and customer_id for staff members. |
uploaded | list uploaded ISOs | 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. Requires administrator privileges.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: add |
| token | ✅ | string | Authorization token |
| params[name] | ✅ | string | Full ISO name |
| params[short_name] | ✅ | string | Short ISO name |
| params[iso_name] | ✅ | string | ISO file name |
| params[private] | ✅ | string | Client email (valid email) |
| params[description] | ❌ | string | ISO image description |
| params[admin_only] | ❌ | integer | Flag for administrator-only access (0 or 1) |
| params[status] | ❌ | string | ISO 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": "ubuntu22",
"iso_name": "ubuntu-22.04.iso",
"private": "[email protected]",
"description": "Ubuntu Server 22.04 LTS",
"admin_only": 0,
"status": "Pending",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}
iso/del¶
Deletes an ISO image. Available to administrators and owners of private images.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: del |
| token | ✅ | string | Authorization token |
| params[id] | ✅ | int | ID of the ISO image to delete |
| params[pending] | ❌ | bool | Delete the record from the database immediately (without queuing) |
Example Request
Example of a successful response
iso/delete¶
Alternative method to delete 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/history¶
Returns the history of operations with ISO images.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: history |
| token | ✅ | string | Authorization token |
| id | ✅ | int | ID of the ISO image to filter history |
Example Request
Example of a successful response
{
"result": "OK",
"action": "history",
"module": "iso",
"data": [
{
"id": 1,
"date": "2024-01-15 10:30:00",
"description": "ISO uploaded",
"type": "upload",
"login": "[email protected]",
"message": "ISO uploaded",
"iso_name": "ubuntu-22.04.iso"
}
]
}
iso/list_iso¶
Returns a list of available ISO images. Server ID is required for clients.
HTTP Method: POST
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": 123,
"iso_name": "ubuntu-22.04.iso",
"description": "Ubuntu Server 22.04 LTS",
"size": 2147483648,
"created_at": "2024-01-15T10:30:00Z"
},
{
"id": 124,
"iso_name": "windows-server-2022.iso",
"description": "Windows Server 2022",
"size": 5368709120,
"created_at": "2024-01-16T09:15:00Z"
}
]
}
iso/mount_iso¶
Mounts an ISO image to the specified server. Returns a task key for tracking.
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. Returns a task key.
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/update¶
Updates metadata of an existing ISO image.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: update |
| token | ✅ | string | Authorization token |
| params[id] | ✅ | int | ID of the ISO image to update |
| params[description] | ❌ | string | New description |
| params[iso_name] | ❌ | string | New ISO name |
Example Request
Example of a successful response
iso/upload¶
Uploads an ISO image via URL. Requires email and customer_id for staff members.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: upload |
| token | ✅ | string | Authorization token |
| params[url] | ✅ | string | ISO image URL (https://...) |
| 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: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: uploaded |
| token | ✅ | string | Authorization token |
| params[email] | ❌ | string | Client email (required for employee role) |
Example Request