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

/devices/update

post

Updates a specified device.

You can add or change custom metadata for a device, change the device's name, or convert a managed device to unmanaged.

Authorizations
Body
device_idstring · uuidRequired

ID of the device that you want to update.

namestring | nullableOptional

Name for the device.

is_managedbooleanOptional

Indicates whether the device is managed. To unmanage a device, set is_managed to false.

Default: true
Responses
200
OK
application/json
post
POST /devices/update HTTP/1.1
Host: connect.getseam.com
Authorization: Bearer API Key
Content-Type: application/json
Accept: */*
Content-Length: 166

{
  "device_id": "123e4567-e89b-12d3-a456-426614174000",
  "properties": {
    "name": "text"
  },
  "name": "text",
  "is_managed": true,
  "custom_metadata": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "ok": true
}

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

Parameter
Type
Description

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

Was this helpful?