Ask or search…
K
Links
Comment on page

Update a Device

Update the properties of a specified device
Updates any of the following properties of a specified device (device object):
  • name (or properties.name)
  • location
  • is_managed
post
https://connect.getseam.com
/devices/update
/devices/update

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.
location
Object Optional
Replacement location information for the device. See location Properties.
is_managed
Boolean Optional
Replacement value to indicate whether Seam manages the device.

Sample Request

Python
cURL (bash)
Javascript
Ruby
PHP
Java
device_id = "30fd243b-3054-4384-a713-5487076a3826"
device_update = seam.devices.update(
device = device_id,
name = "My Lock"
)
pprint(device_update)
curl -X 'POST' \
'https://connect.getseam.com/devices/update' \
-H 'accept: application/json' \
-H 'Authorization: Bearer ${API_KEY}' \
-H 'Content-Type: application/json' \
-d '{
"device_id": "30fd243b-3054-4384-a713-5487076a3826",
"name": "My Lock"
}'
const deviceId = "30fd243b-3054-4384-a713-5487076a3826"
const deviceUpdate = await seam.devices.update({
device_id: deviceId,
name: "My Lock"
})
console.log(deviceUpdate)
device_id = "30fd243b-3054-4384-a713-5487076a3826"
device_update = client.devices.update(
device_id: device_id,
name: "My Lock"
)
puts device_update.inspect
$device_update = $seam->devices->update(
device_id: "30fd243b-3054-4384-a713-5487076a3826",
name: "My Lock"
)
echo json_encode($device_update, JSON_PRETTY_PRINT);
var deviceId = "30fd243b-3054-4384-a713-5487076a3826";
seam.devices().update(DevicesUpdateRequest.builder()
.deviceId(deviceId)
.name("My Lock")
.build());

Response

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

Sample Response

Python
cURL (bash)
JavaScript
Ruby
PHP
True
{
"ok": true
}
{ ok: true }
{"ok"=>true}
true