Skip to main content

DeviceService

A list of all methods in the DeviceService service. Click on the method name to view detailed information about that method.

MethodsDescription
GetDevicesAsyncList all available devices
GetDeviceAsyncGet details of a single device from its given {deviceId}.
UpdateDeviceAsyncUpdate a single device from its given {deviceId}.
DeleteDeviceAsyncDelete 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

NameTypeRequiredDescription
deviceIdstringID 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

NameTypeRequiredDescription
inputDevicePutThe request body.
deviceIdstringID 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

NameTypeRequiredDescription
deviceIdstringID 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

Start for Free →