Seam Docs
Search…
Devices
An internet-connected device that has been connected to the Seam platform.

The Device Object

device_id
uuid
ID of the Device
device_type
string
Type of Device
workspace_id
uuid
ID of the workspace that the device belongs to
properties
object
Properties for the Device
created_at
datetime
Timestamp of creation time
location
object
Location information for the Device

Get a Device

get
https://connect.getseam.com
/devices/get
Get a device
Python
Javascript
Ruby
from seamapi import Seam
​
seam = Seam()
device_id = "123e4567-e89b-12d3-a456-426614174000"
device = seam.devices.get(device_id)
​
print(device)
# {
# "device_id": "123e4567-e89b-12d3-a456-426614174000",
# "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
# "properties": {},
# "location": {},
# "device_type": "SCHLAGE_LOCK",
# "third_party_account_id": "123e4567-e89b-12d3-a456-426614174000",
# "name": "Workspace 1",
# "is_sandbox": false
# }
import Seam from "seamapi"
​
const seam = Seam()
const deviceId = "123e4567-e89b-12d3-a456-426614174000"
const device = await seam.devices.get(deviceId)
​
console.log(device)
​
/*
{
"device_id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"properties": {},
"location": {},
"device_type": "SCHLAGE_LOCK",
"third_party_account_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Workspace 1",
"is_sandbox": false
}
*/
require "seamapi"
​
seam = Seam::Client.new(api_key: "MY_API_KEY")
device_id = "123e4567-e89b-12d3-a456-426614174000"
​
device = seam.devices.get(device_id)
​
puts device
# <Seam::Device:0x00764f8
# device_id="e002825a-27ee-4d74-9be3-45564b14c931"
# device_type="smartthings_lock"
# properties={
# "locked"=>true,
# "online"=>true,
# "battery_level"=>1,
# "smartthings_metadata"=>{
# "device_id"=>"83b32603-e36a-416b-a06e-78215223df98",
# "device_name"=>"Yale Door Lock"},
# "name"=>"Yale Door Lock"}>

List Devices

get
https://connect.getseam.com
/devices/list
Get a list of devices
Python
Javascript
Ruby
from seamapi import Seam
​
seam = Seam()
devices = seam.devices.list()
​
print(devices)
# [
# {
# "device_id": "123e4567-e89b-12d3-a456-426614174000",
# "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
# "properties": {},
# "location": {},
# "device_type": "SCHLAGE_LOCK",
# "third_party_account_id": "123e4567-e89b-12d3-a456-426614174000",
# "name": "Workspace 1",
# "is_sandbox": false
# }
# ]
import Seam from "seamapi"
​
const seam = Seam()
const devices = await seam.devices.list()
​
console.log(devices)
/*
[
{
"device_id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"properties": {},
"location": {},
"device_type": "SCHLAGE_LOCK",
"third_party_account_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Workspace 1",
"is_sandbox": false
}
]
*/
require "seamapi"
​
seam = Seam::Client.new(api_key: "MY_API_KEY")
devices = seam.devices.list
​
puts devices
# [<Seam::Device:0x00764f8
# device_id="e002825a-27ee-4d74-9be3-45564b14c931"
# device_type="smartthings_lock"
# properties={
# "locked"=>true,
# "online"=>true,
# "battery_level"=>1,
# "smartthings_metadata"=>{
# "device_id"=>"83b32603-e36a-416b-a06e-78215223df98",
# "device_name"=>"Yale Door Lock"},
# "name"=>"Yale Door Lock"}>]

​