DeviceService
A list of all methods in the DeviceService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
GetDevicesAsync | List all available devices |
GetDeviceAsync | Get details of a single device from its given {deviceId} . |
UpdateDeviceAsync | Update a single device from its given {deviceId} . |
DeleteDeviceAsync | Delete a single Device from its given {deviceId} . The bridge device cannot be deleted. |
GetDevicesAsync
List all available devices
- HTTP Method:
GET
- Endpoint:
/clip/v2/resource/device
Return Type
GetDevicesOkResponse
Example Usage Code Snippet
using OpenHue;
var client = new OpenHueClient();
var response = await client.Device.GetDevicesAsync();
Console.WriteLine(response);
GetDeviceAsync
Get details of a single device from its given {deviceId}
.
- HTTP Method:
GET
- Endpoint:
/clip/v2/resource/device/{deviceId}
Parameters
Name | Type | Required | Description |
---|---|---|---|
deviceId | string | ✅ | ID of the device |
Return Type
GetDeviceOkResponse
Example Usage Code Snippet
using OpenHue;
var client = new OpenHueClient();
var response = await client.Device.GetDeviceAsync("deviceId");
Console.WriteLine(response);
UpdateDeviceAsync
Update a single device from its given {deviceId}
.
- HTTP Method:
PUT
- Endpoint:
/clip/v2/resource/device/{deviceId}
Parameters
Name | Type | Required | Description |
---|---|---|---|
input | DevicePut | ❌ | The request body. |
deviceId | string | ✅ | ID of the device |
Return Type
UpdateDeviceOkResponse
Example Usage Code Snippet
using OpenHue;
using OpenHue.Models;
var client = new OpenHueClient();
var input = new DevicePut();
var response = await client.Device.UpdateDeviceAsync(input, "deviceId");
Console.WriteLine(response);
DeleteDeviceAsync
Delete a single Device from its given {deviceId}
. The bridge
device cannot be deleted.
- HTTP Method:
DELETE
- Endpoint:
/clip/v2/resource/device/{deviceId}
Parameters
Name | Type | Required | Description |
---|---|---|---|
deviceId | string | ✅ | ID of the Device |
Return Type
DeleteDeviceOkResponse
Example Usage Code Snippet
using OpenHue;
var client = new OpenHueClient();
var response = await client.Device.DeleteDeviceAsync("deviceId");
Console.WriteLine(response);
Build Your Own SDKs with liblab
Build developer friendly SDKs in minutes from your APIs