Filtering Devices by Custom Metadata
When listing devices, you can filter by custom metadata.
const devices = await seam.devices.list({
custom_metadata_has: {
"internal_account_id": "user-1"
}
});
console.log(devices);[
{
device_id: 'f7a7fb02-9277-4354-8dd1-28e2d016a7a9',
device_type: 'schlage_lock',
...
is_managed: true,
custom_metadata: { internal_account_id: 'user-1' }
},
...
]curl -X 'POST' \
'https://connect.getseam.com/devices/list' \
-H 'accept: application/json' \
-H 'Authorization: Bearer ${API_KEY}' \
-H 'Content-Type: application/json' \
-d '{
"custom_metadata_has": {
"internal_account_id": "user-1"
},
}'{
"devices": [
{
"device_id": "f7a7fb02-9277-4354-8dd1-28e2d016a7a9",
"device_type": "schlage_lock",
...
"is_managed": true,
"custom_metadata": {
"internal_account_id": "user-1"
}
}
],
"ok": true
}Last updated
Was this helpful?

