Testing Your App Against Device Disconnection and Removal
Learn how to use the Seam suite of simulate endpoints to test your app against events that are difficult to orchestrate in your quality assurance environment.
Simulation Capability Flags
Simulate Disconnecting a Device
# Get the device.
device = seam.devices.get(
device_id="11111111-1111-1111-1111-444444444444"
)
# Confirm that Seam supports simulated disconnection for the device.
if device.can_simulate_disconnection:
# Perform the simulated disconnection.
seam.devices.simulate.disconnect(device_id=device.device_id)None# Get the device.
device=$(
# Use GET or POST.
curl -X 'GET' \
'https://connect.getseam.com/devices/get' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"device_id": "11111111-1111-1111-1111-444444444444"
}')
# Confirm that Seam supports simulated disconnection for the device.
if $(jq -r '.device.can_simulate_disconnection' <<< ${device}); then \
# Perform the simulated disconnection.
curl -X 'POST' \
'https://connect.getseam.com/devices/simulate/disconnect' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"device_id\": \"$(jq -r '.device.device_id' <<< ${device})\"
}";
fiSimulate Connecting a Device
Simulate Removing a Device
Simulate Device Disconnection, Connection, and Removal in the Seam Console
Last updated
Was this helpful?

