All URIs are relative to https://truenas.local/api/v2.0.
Method | HTTP request | Description |
---|---|---|
vmDeviceBindChoicesGet() | GET /vm/device/bind_choices | |
vmDeviceDiskChoicesGet() | GET /vm/device/disk_choices | |
vmDeviceGet() | GET /vm/device | |
vmDeviceIdIdDelete() | DELETE /vm/device/id/{id} | |
vmDeviceIdIdGet() | GET /vm/device/id/{id} | |
vmDeviceIdIdPut() | PUT /vm/device/id/{id} | |
vmDeviceIommuEnabledGet() | GET /vm/device/iommu_enabled | |
vmDeviceNicAttachChoicesGet() | GET /vm/device/nic_attach_choices | |
vmDevicePassthroughDeviceChoicesGet() | GET /vm/device/passthrough_device_choices | |
vmDevicePassthroughDevicePost() | POST /vm/device/passthrough_device | |
vmDevicePost() | POST /vm/device | |
vmDevicePptdevChoicesGet() | GET /vm/device/pptdev_choices |
vmDeviceBindChoicesGet()
Available choices for Bind attribute.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->vmDeviceBindChoicesGet();
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDeviceBindChoicesGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDeviceDiskChoicesGet()
Returns disk choices for device type "DISK".
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->vmDeviceDiskChoicesGet();
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDeviceDiskChoicesGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDeviceGet($limit, $offset, $count, $sort)
query-options.extra
can be specified as query parameters with prefixing them with extra.
prefix. For example, extra.retrieve_properties=false
will pass retrieve_properties
as an extra argument to pool/dataset endpoint.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$limit = 56; // int
$offset = 56; // int
$count = True; // bool
$sort = 'sort_example'; // string
try {
$apiInstance->vmDeviceGet($limit, $offset, $count, $sort);
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDeviceGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
limit | int | [optional] | |
offset | int | [optional] | |
count | bool | [optional] | |
sort | string | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDeviceIdIdDelete($id)
Delete a VM device of id
.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 56; // int
try {
$apiInstance->vmDeviceIdIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDeviceIdIdDelete: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDeviceIdIdGet($id)
query-options.extra
can be specified as query parameters with prefixing them with extra.
prefix. For example, extra.retrieve_properties=false
will pass retrieve_properties
as an extra argument to pool/dataset endpoint.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 56; // int
try {
$apiInstance->vmDeviceIdIdGet($id);
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDeviceIdIdGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDeviceIdIdPut($id)
Update a VM device of id
. Pass attributes.size
to resize a dtype
RAW
device. The raw file will be resized.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 56; // int
try {
$apiInstance->vmDeviceIdIdPut($id);
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDeviceIdIdPut: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDeviceIommuEnabledGet()
Returns "true" if iommu is enabled, "false" otherwise
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->vmDeviceIommuEnabledGet();
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDeviceIommuEnabledGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDeviceNicAttachChoicesGet()
Available choices for NIC Attach attribute.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->vmDeviceNicAttachChoicesGet();
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDeviceNicAttachChoicesGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDevicePassthroughDeviceChoicesGet()
Available choices for PCI passthru devices.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->vmDevicePassthroughDeviceChoicesGet();
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDevicePassthroughDeviceChoicesGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDevicePassthroughDevicePost($body)
Retrieve details about device
PCI device.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = 'body_example'; // string
try {
$apiInstance->vmDevicePassthroughDevicePost($body);
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDevicePassthroughDevicePost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
body | string | [optional] |
void (empty response body)
- Content-Type:
application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDevicePost($vm_device_create0)
Create a new device for the VM of id vm
. If dtype
is the RAW
type and a new raw file is to be created, attributes.exists
will be passed as false. This means the API handles creating the raw file and raises the appropriate exception if file creation fails. If dtype
is of DISK
type and a new Zvol is to be created, attributes.create_zvol
will be passed as true with valid attributes.zvol_name
and attributes.zvol_volsize
values.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$vm_device_create0 = new \RMoore\Truenas\Model\VmDeviceCreate0(); // \RMoore\Truenas\Model\VmDeviceCreate0
try {
$apiInstance->vmDevicePost($vm_device_create0);
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDevicePost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
vm_device_create0 | \RMoore\Truenas\Model\VmDeviceCreate0 | [optional] |
void (empty response body)
- Content-Type:
application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
vmDevicePptdevChoicesGet()
Available choices for PCI passthru device.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\VmDeviceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->vmDevicePptdevChoicesGet();
} catch (Exception $e) {
echo 'Exception when calling VmDeviceApi->vmDevicePptdevChoicesGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]