Update a Device

Update the properties of a specified device

Updates any of the following properties of a specified device:

  • name (or properties.name)

  • custom_metadata

  • is_managed

Request

Specify the desired device by including the corresponding device_id in the request body. In addition, in the request body, include the properties that you want to update, along with the desired replacement values.

Request Body Parameters

ParameterTypeDescription

device_id

String Required

ID of the desired device.

name (or properties.name)

String Optional

Replacement name for the device.

custom_metadata

JSON object Optional

Custom metadata for the device. Specify up to 50 keys, with key names up to 40 characters long. Accepts string or Boolean values. Strings are limited to 500 characters. For more information, see Adding Custom Metadata to Devices.

is_managed

Boolean Optional

Replacement value to indicate whether Seam manages the device.

Sample Request

device_update = seam.devices.update(
    device = "30fd243b-3054-4384-a713-5487076a3826",
    name = "My Lock",
    custom_metadata = {
        "internal_account_id": "user-1"
    }
)

pprint(device_update)

Response

Returns a Boolean ok status indicator (with the exception of the Java SDK).

Sample Response

True

Last updated

Logo

© Seam Labs, Inc. All rights reserved.