All URIs are relative to https://YOUR_SUPLA_SERVER/api/v3, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| deleteDevice() | DELETE /iodevices/{id} | Delete the device |
| executeDeviceAction() | PATCH /iodevices/{id} | |
| getIoDevice() | GET /iodevices/{id} | Get Device |
| getIoDeviceNotifications() | GET /iodevices/{device}/notifications | |
| getIoDevices() | GET /iodevices | Get Devices |
| getSubDevices() | GET /subdevices | |
| updateDevice() | PUT /iodevices/{id} |
deleteDevice($id, $safe)Delete the device
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\DevicesApi(
// 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 | ID
$safe = True; // bool | Whether to perform actions that require data loss (e.g. delete schedules when deleting the device)
try {
$apiInstance->deleteDevice($id, $safe);
} catch (Exception $e) {
echo 'Exception when calling DevicesApi->deleteDevice: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID | |
| safe | bool | Whether to perform actions that require data loss (e.g. delete schedules when deleting the device) | [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]
executeDeviceAction($id, $executeSubDeviceActionRequest): \Supla\ApiClient\Model\Device<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\DevicesApi(
// 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 | ID
$executeSubDeviceActionRequest = new \Supla\ApiClient\Model\ExecuteSubDeviceActionRequest(); // \Supla\ApiClient\Model\ExecuteSubDeviceActionRequest
try {
$result = $apiInstance->executeDeviceAction($id, $executeSubDeviceActionRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DevicesApi->executeDeviceAction: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID | |
| executeSubDeviceActionRequest | \Supla\ApiClient\Model\ExecuteSubDeviceActionRequest |
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getIoDevice($id, $include): \Supla\ApiClient\Model\DeviceGet Device
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\DevicesApi(
// 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 = new \Supla\ApiClient\Model\\Supla\ApiClient\Model\GetIoDeviceIdParameter(); // \Supla\ApiClient\Model\GetIoDeviceIdParameter | ID
$include = array('include_example'); // string[] | List of extra fields to include in the response.
try {
$result = $apiInstance->getIoDevice($id, $include);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DevicesApi->getIoDevice: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | \Supla\ApiClient\Model\GetIoDeviceIdParameter | ID | |
| include | string[] | List of extra fields to include in the response. | [optional] |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getIoDeviceNotifications($device, $include): \Supla\ApiClient\Model\Notification[]<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\DevicesApi(
// 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
);
$device = 56; // int | ID
$include = array('include_example'); // string[] | List of extra fields to include in the response.
try {
$result = $apiInstance->getIoDeviceNotifications($device, $include);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DevicesApi->getIoDeviceNotifications: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| device | int | ID | |
| include | string[] | List of extra fields to include in the response. | [optional] |
\Supla\ApiClient\Model\Notification[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getIoDevices($include): \Supla\ApiClient\Model\Device[]Get Devices
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\DevicesApi(
// 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
);
$include = array('include_example'); // string[] | List of extra fields to include in the response.
try {
$result = $apiInstance->getIoDevices($include);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DevicesApi->getIoDevices: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| include | string[] | List of extra fields to include in the response. | [optional] |
\Supla\ApiClient\Model\Device[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getSubDevices(): object[]<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\DevicesApi(
// 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 {
$result = $apiInstance->getSubDevices();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DevicesApi->getSubDevices: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
object[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateDevice($id, $updateDeviceRequest, $safe): \Supla\ApiClient\Model\Device<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Supla\ApiClient\Api\DevicesApi(
// 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 | ID
$updateDeviceRequest = new \Supla\ApiClient\Model\UpdateDeviceRequest(); // \Supla\ApiClient\Model\UpdateDeviceRequest
$safe = True; // bool | Whether to perform actions that require data loss (e.g. disable schedules when disabling the device)
try {
$result = $apiInstance->updateDevice($id, $updateDeviceRequest, $safe);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DevicesApi->updateDevice: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID | |
| updateDeviceRequest | \Supla\ApiClient\Model\UpdateDeviceRequest | ||
| safe | bool | Whether to perform actions that require data loss (e.g. disable schedules when disabling the device) | [optional] |
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]