From f60a851e868f109e7eb29cc2afb31bedc77e152b Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Fri, 4 Oct 2024 17:14:45 +0000 Subject: [PATCH] GITBOOK-457: Add simulate endpoints --- docs/SUMMARY.md | 1 + docs/core-concepts/devices/README.md | 5 +- .../devices/displaying-device-health.md | 6 +- ...gainst-device-disconnection-and-removal.md | 756 ++++++++++++++++++ docs/core-concepts/workspaces/README.md | 8 +- .../suspending-and-unsuspending-users.md | 8 +- docs/products/noise-sensors/README.md | 5 +- docs/products/smart-locks/lock-and-unlock.md | 4 +- 8 files changed, 777 insertions(+), 16 deletions(-) create mode 100644 docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 4e52aedd..542105bd 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -21,6 +21,7 @@ * [Managed and Unmanaged Devices](core-concepts/devices/managed-and-unmanaged-devices.md) * [Adding Custom Metadata to a Device](core-concepts/devices/adding-custom-metadata-to-a-device.md) * [Filtering Devices by Custom Metadata](core-concepts/devices/filtering-devices-by-custom-metadata.md) + * [Testing Your App Against Device Disconnection and Removal](core-concepts/devices/testing-your-app-against-device-disconnection-and-removal.md) * [Connected Accounts](core-concepts/connected-accounts/README.md) * [Adding Custom Metadata to a Connected Account](core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account.md) * [Filtering Connected Accounts by Custom Metadata](core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata.md) diff --git a/docs/core-concepts/devices/README.md b/docs/core-concepts/devices/README.md index bafed327..a6a1449d 100644 --- a/docs/core-concepts/devices/README.md +++ b/docs/core-concepts/devices/README.md @@ -28,6 +28,7 @@ Seam exposes each capability as a set of APIs that are standardized across brand In addition, Seam provides the following three sets of device-related features: -* **Actions:** Commands that you can issue to the device, such as unlock. For more information, see the [Capability Guides](broken-reference). +* **Actions:** Commands that you can issue to the device, such as unlock. For more information, see the [Capability Guides](broken-reference/). * **Properties:** The current state of the device, such as the locked, online, and managed statuses. For details, see [`device` Properties](../../api-clients/devices/#device-properties). -* **Events:** Notifications related to changes in the state of the device, such as an unlocking operation performed with an access code. For details, see [Events](../../api-clients/events/). +* **Events:** Notifications related to changes in the state of the device, such as an unlocking operation performed with an access code. For details, see [Events](../../api-clients/events/).\ + To help you test your app against events—like device disconnection or removal—that are difficult to orchestrate in a QA environment using real devices, Seam provides a suite of `simulate` endpoints that you can use in a [sandbox workspace](../workspaces/#sandbox-workspaces). See [Testing Your App Against Device Disconnection and Removal](testing-your-app-against-device-disconnection-and-removal.md). diff --git a/docs/core-concepts/devices/displaying-device-health.md b/docs/core-concepts/devices/displaying-device-health.md index ef843769..666bfc53 100644 --- a/docs/core-concepts/devices/displaying-device-health.md +++ b/docs/core-concepts/devices/displaying-device-health.md @@ -168,11 +168,15 @@ Online: true When a device connection or disconnection occurs, Seam generates a [`device.connected`](../../api-clients/events/#event-types) or [`device.disconnected`](../../api-clients/events/#event-types) event, respectively. You can retrieve these events using a [List Events](../../api-clients/events/list.md) request or through [webhooks](../webhooks.md) and then display the corresponding status in your app. +{% hint style="info" %} +To help you test your app against events—like device disconnection or removal—that are difficult to orchestrate in a QA environment using real devices, Seam provides a suite of `simulate` endpoints that you can use in a [sandbox workspace](../workspaces/#sandbox-workspaces). See [Testing Your App Against Device Disconnection and Removal](testing-your-app-against-device-disconnection-and-removal.md). +{% endhint %} + ### Get Connection-Related Events Using a List Events Request When issuing a [List Events](../../api-clients/events/list.md) request to retrieve [`device.connected`](../../api-clients/events/#event-types) or [`device.disconnected`](../../api-clients/events/#event-types) events for a specific device, include the following parameters: -
ParameterTypeDescription
device_idString (UUID)ID of the device for which you want to retrieve device.connected or device.disconnected events
event_typeStringEvent type that you want to retrieve, that is, device.connected or device.disconnected
sinceStringDesired starting event generation date and time
You must include since or between.
betweenSet of two stringsDesired starting and ending event generation dates and times
For example:
["2024-01-01T00:00:00Z", "2024-02-01T00:00:00Z"]
You must include between or since.
+
ParameterTypeDescription
device_idString (UUID)ID of the device for which you want to retrieve device.connected or device.disconnected events
event_typeStringEvent type that you want to retrieve, that is, device.connected or device.disconnected
sinceStringDesired starting event generation date and time
You must include since or between.
betweenSet of two stringsDesired starting and ending event generation dates and times
For example:
["2024-01-01T00:00:00Z", "2024-02-01T00:00:00Z"]
You must include between or since.
The following example uses the List Events request to retrieve all `device.connected` events for a specific device since January 1, 2024: diff --git a/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal.md b/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal.md new file mode 100644 index 00000000..21017be3 --- /dev/null +++ b/docs/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal.md @@ -0,0 +1,756 @@ +--- +description: >- + 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. +--- + +# Testing Your App Against Device Disconnection and Removal + +When developing an app to control IoT devices—before moving to production—it is imperative to test your app against events like device disconnection and removal. However, it can be difficult to orchestrate these events in your quality assurance (QA) environment using real devices. To help you test your app more easily and effectively, Seam provides the following suite of `simulate` endpoints that you can use in a [sandbox workspace](../workspaces/#sandbox-workspaces): + +* [`devices/simulate/disconnect`](testing-your-app-against-device-disconnection-and-removal.md#simulate-disconnecting-a-device) +* [`devices/simulate/connect`](testing-your-app-against-device-disconnection-and-removal.md#simulate-connecting-a-device) +* [`devices/simulate/remove`](testing-your-app-against-device-disconnection-and-removal.md#simulate-removing-a-device) + +{% hint style="info" %} +Currently, Seam supports these endpoints for [August](../../device-guides/sandbox-and-sample-data/august-locks-sample-data.md) and [Yale](../../device-guides/sandbox-and-sample-data/yale-sample-data.md) sandbox devices. +{% endhint %} + +*** + +## Simulation Capability Flags + +The Seam API provides the following sandbox-only [capability flags](../../capability-guides/device-and-system-capabilities.md#capability-flags) that show you which simulate endpoints you can currently use on a device: + +* `device.can_simulate_disconnection` +* `device.can_simulate_connection` +* `device.can_simulate_removal` + +*** + +## Simulate Disconnecting a Device + +To simulate a device disconnection: + +{% tabs %} +{% tab title="Python" %} +**Code:** + +```python +# 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) +``` + +**Output:** + +``` +None +``` +{% endtab %} + +{% tab title="cURL (bash)" %} +**Code:** + +```bash +# 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})\" + }"; +fi +``` + +**Output:** + +```json +{ + "ok": true +} +``` +{% endtab %} + +{% tab title="JavaScript" %} +**Code:** + +```javascript +// Get the device. +const device = await 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. + await seam.devices.simulate.disconnect({ + device_id: device.device_id + }) +}; +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="Ruby" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```ruby +# Get the device. +device = client.devices.get("11111111-1111-1111-1111-444444444444") + +# Confirm that Seam supports simulated disconnection for the device. +if (device.can_simulate_disconnection) + # Perform the simulated disconnection. + client.devices.simulate.disconnect(device_id: device.device_id) +end +``` + +**Output:** + +``` +nil +``` +{% endtab %} + +{% tab title="PHP" %} +**Code:** + +```php +// 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); +} +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="C#" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```csharp +// Get the device. +Device device = seam.Devices.Get(deviceId: "11111111-1111-1111-1111-444444444444"); + +// Confirm that Seam supports simulated disconnection for the device. +if (device.CanSimulateDisconnection == true) { + // Perform the simulated disconnection. + seam.Devices.Simulate.Disconnect(deviceId: device.DeviceId); +} +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="Java" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```java +// Get the device. +Device device = seam.devices() + .get(DevicesGetRequest.builder() + .deviceId("11111111-1111-1111-1111-444444444444") + .build()); + +// Confirm that Seam supports simulated disconnection for the device. +if (device.getCanSimulateDisconnection()) +{ + // Perform the simulated disconnection. + seam.devices().simulate() + .disconnect(DevicesSimulateDisconnectRequest.builder() + .deviceId(device.getDeviceId()) + .build()); +} +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="Go" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```go +// Get the device. +device, uErr := client.Devices.Get( + context.Background(), + &api.DevicesGetRequest{ + DeviceId: api.String("11111111-1111-1111-1111-444444444444"), + }) + +// Confirm that Seam supports simulated disconnection for the device. +if *device.CanSimulateDisconnection { + // Perform the simulated disconnection. + client.Devices.Simulate.Disconnect( + context.Background(), + &api.DevicesSimulateDisconnectRequest{ + DeviceId: device.DeviceId, + }, + ) + } + +if uErr != nil { + return uErr +} + +return nil +``` + +**Output:** + +```json +void +``` +{% endtab %} +{% endtabs %} + +*** + +## Simulate Connecting a Device + +To simulate a device connection: + +{% tabs %} +{% tab title="Python" %} +**Code:** + +```python +# Get the device. +device = seam.devices.get( + device_id="11111111-1111-1111-1111-444444444444" +) + +# Confirm that Seam supports simulated connection for the device. +if device.can_simulate_connection: + # Perform the simulated connection. + seam.devices.simulate.connect(device_id=device.device_id) +``` + +**Output:** + +``` +None +``` +{% endtab %} + +{% tab title="cURL (bash)" %} +**Code:** + +```bash +# 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 connection for the device. +if $(jq -r '.device.can_simulate_connection' <<< ${device}); then \ + # Perform the simulated connection. + curl -X 'POST' \ + 'https://connect.getseam.com/devices/simulate/connect' \ + -H 'accept: application/json' \ + -H "Authorization: Bearer ${SEAM_API_KEY}" \ + -H 'Content-Type: application/json' \ + -d "{ + \"device_id\": \"$(jq -r '.device.device_id' <<< ${device})\" + }"; +fi +``` + +**Output:** + +```json +{ + "ok": true +} +``` +{% endtab %} + +{% tab title="JavaScript" %} +**Code:** + +```javascript +// Get the device. +const device = await seam.devices.get({ + device_id: "11111111-1111-1111-1111-444444444444" +}); + +// Confirm that Seam supports simulated connection for the device. +if (device.can_simulate_connection) { + // Perform the simulated connection. + await seam.devices.simulate.connect({ + device_id: device.device_id + }) +}; +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="Ruby" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```ruby +# Get the device. +device = client.devices.get("11111111-1111-1111-1111-444444444444") + +# Confirm that Seam supports simulated connection for the device. +if (device.can_simulate_connection) + # Perform the simulated connection. + client.devices.simulate.connect(device_id: device.device_id) +end +``` + +**Output:** + +``` +nil +``` +{% endtab %} + +{% tab title="PHP" %} +**Code:** + +```php +// Get the device. +$device = $seam->devices->get(device_id: "11111111-1111-1111-1111-444444444444"); + +// Confirm that Seam supports simulated connection for the device. +if ($device->can_simulate_connection) { + // Perform the simulated connection. + $seam->devices->simulate->connect(device_id: $device->device_id); +} +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="C#" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```csharp +// Get the device. +Device device = seam.Devices.Get(deviceId: "11111111-1111-1111-1111-444444444444"); + +// Confirm that Seam supports simulated connection for the device. +if (device.CanSimulateConnection == true) { + // Perform the simulated connection. + seam.Devices.Simulate.Connect(deviceId: device.DeviceId); +} +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="Java" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```java +// Get the device. +Device device = seam.devices() + .get(DevicesGetRequest.builder() + .deviceId("11111111-1111-1111-1111-444444444444") + .build()); + +// Confirm that Seam supports simulated connection for the device. +if (device.getCanSimulateConnection()) +{ + // Perform the simulated connection. + seam.devices().simulate() + .connect(DevicesSimulateConnectRequest.builder() + .deviceId(device.getDeviceId()) + .build()); +} +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="Go" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```go +// Get the device. +device, uErr := client.Devices.Get( + context.Background(), + &api.DevicesGetRequest{ + DeviceId: api.String("11111111-1111-1111-1111-444444444444"), + }) + +// Confirm that Seam supports simulated connection for the device. +if *device.CanSimulateConnection { + // Perform the simulated connection. + client.Devices.Simulate.Connect( + context.Background(), + &api.DevicesSimulateConnectRequest{ + DeviceId: device.DeviceId, + }, + ) + } + +if uErr != nil { + return uErr +} + +return nil +``` + +**Output:** + +```json +void +``` +{% endtab %} +{% endtabs %} + +*** + +## Simulate Removing a Device + +To simulate a device removal: + +{% tabs %} +{% tab title="Python" %} +**Code:** + +```python +# Get the device. +device = seam.devices.get( + device_id="11111111-1111-1111-1111-444444444444" +) + +# Confirm that Seam supports simulated removal for the device. +if device.can_simulate_removal: + # Perform the simulated removal. + seam.devices.simulate.remove(device_id=device.device_id) +``` + +**Output:** + +``` +None +``` +{% endtab %} + +{% tab title="cURL (bash)" %} +**Code:** + +```bash +# 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 removal for the device. +if $(jq -r '.device.can_simulate_removal' <<< ${device}); then \ + # Perform the simulated removal. + curl -X 'POST' \ + 'https://connect.getseam.com/devices/simulate/remove' \ + -H 'accept: application/json' \ + -H "Authorization: Bearer ${SEAM_API_KEY}" \ + -H 'Content-Type: application/json' \ + -d "{ + \"device_id\": \"$(jq -r '.device.device_id' <<< ${device})\" + }"; +fi +``` + +**Output:** + +```json +{ + "ok": true +} +``` +{% endtab %} + +{% tab title="JavaScript" %} +**Code:** + +```javascript +// Get the device. +const device = await seam.devices.get({ + device_id: "11111111-1111-1111-1111-444444444444" +}); + +// Confirm that Seam supports simulated removal for the device. +if (device.can_simulate_removal) { + // Perform the simulated removal. + await seam.devices.simulate.remove({ + device_id: device.device_id + }) +}; +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="Ruby" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```ruby +# Get the device. +device = client.devices.get("11111111-1111-1111-1111-444444444444") + +# Confirm that Seam supports simulated removal for the device. +if (device.can_simulate_removal) + # Perform the simulated removal. + client.devices.simulate.remove(device_id: device.device_id) +end +``` + +**Output:** + +``` +nil +``` +{% endtab %} + +{% tab title="PHP" %} +**Code:** + +```php +// Get the device. +$device = $seam->devices->get(device_id: "11111111-1111-1111-1111-444444444444"); + +// Confirm that Seam supports simulated removal for the device. +if ($device->can_simulate_removal) { + // Perform the simulated removal. + $seam->devices->simulate->remove(device_id: $device->device_id); +} +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="C#" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```csharp +// Get the device. +Device device = seam.Devices.Get(deviceId: "11111111-1111-1111-1111-444444444444"); + +// Confirm that Seam supports simulated removal for the device. +if (device.CanSimulateRemoval == true) { + // Perform the simulated removal. + seam.Devices.Simulate.Remove(deviceId: device.DeviceId); +} +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="Java" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```java +// Get the device. +Device device = seam.devices() + .get(DevicesGetRequest.builder() + .deviceId("11111111-1111-1111-1111-444444444444") + .build()); + +// Confirm that Seam supports simulated removal for the device. +if (device.getCanSimulateRemoval()) +{ + // Perform the simulated removal. + seam.devices().simulate() + .remove(DevicesSimulateRemoveRequest.builder() + .deviceId(device.getDeviceId()) + .build()); +} +``` + +**Output:** + +```json +void +``` +{% endtab %} + +{% tab title="Go" %} +{% hint style="info" %} +Coming soon! +{% endhint %} + +**Code:** + +```go +// Get the device. +device, uErr := client.Devices.Get( + context.Background(), + &api.DevicesGetRequest{ + DeviceId: api.String("11111111-1111-1111-1111-444444444444"), + }) + +// Confirm that Seam supports simulated removal for the device. +if *device.CanSimulateRemoval { + // Perform the simulated removal. + client.Devices.Simulate.Remove( + context.Background(), + &api.DevicesSimulateRemoveRequest{ + DeviceId: device.DeviceId, + }, + ) + } + +if uErr != nil { + return uErr +} + +return nil +``` + +**Output:** + +```json +void +``` +{% endtab %} +{% endtabs %} + +*** + +## Simulate Device Disconnection, Connection, and Removal in the Seam Console + +You can also use the [Seam Console](https://console.seam.co/) to simulate disconnecting, connecting, and removing a device. + +{% hint style="info" %} +Currently, Seam supports these actions for [August](../../device-guides/sandbox-and-sample-data/august-locks-sample-data.md) and [Yale](../../device-guides/sandbox-and-sample-data/yale-sample-data.md) sandbox devices. +{% endhint %} + +1. In the upper-right corner of the Seam Console, click the down arrow to display the workspace list and select a sandbox workspace. +2. In the left navigation pane of the Seam Console, click **Connected Accounts**. +3. Click the account that contains the device that you want to simulate disconnecting, connecting, or removing. +4. At the right of the row for the desired device, click **...** and select **Simulate Removal**, **Simulate Connection**, or **Simulate Disconnection**.\ + The Seam Console only displays the actions that you can perform based on the current state of the device. For example, if the device is already disconnected, you cannot simulate disconnection. +5. Click **Simulate Removal**, **Simulate Connection**, or **Simulate Disconnection** to confirm the action. diff --git a/docs/core-concepts/workspaces/README.md b/docs/core-concepts/workspaces/README.md index 218866e6..e459a81d 100644 --- a/docs/core-concepts/workspaces/README.md +++ b/docs/core-concepts/workspaces/README.md @@ -133,11 +133,15 @@ You can trigger test events for some virtual devices. This capability is useful {% @supademo/embed demoId="NuhwAWiC1CaeGPRZzDENn" url="https://app.supademo.com/demo/NuhwAWiC1CaeGPRZzDENn" %} +### Testing Your App + +To help you test your app against events—like device disconnection or removal—that are difficult to orchestrate in a QA environment using real devices, Seam provides a suite of `simulate` endpoints that you can use in a [sandbox workspace](./#sandbox-workspaces). See [Testing Your App Against Device Disconnection and Removal](../devices/testing-your-app-against-device-disconnection-and-removal.md). + ### Resetting Sandbox Workspaces Sandbox workspace are unique in that you can reset them to the original starting state. For example, if you need to run complex continuous integration (CI) testing for an app, you can reset the sandbox workspace after each individual test run. -You can reset a sandbox workspace either manually through the [Seam Console](./#reset-a-sandbox-workspace-using-the-seam-console) or programmatically using the [Seam API](./#reset-a-sandbox-workspace-using-the-seam-api). For detailed information about resetting a sandbox workspace through the Seam API, see the [Reset Workspace](../../api-clients/workspaces/reset_sandbox.md) API reference. +You can reset a sandbox workspace either manually through the [Seam Console](./#reset-a-sandbox-workspace-using-the-seam-console) or programmatically using the [Seam API](./#reset-a-sandbox-workspace-using-the-seam-api). For detailed information about resetting a sandbox workspace through the Seam API, see the [Reset Workspace](../../api-clients/workspaces/reset\_sandbox.md) API reference. #### Reset a Sandbox Workspace Using the Seam Console @@ -194,4 +198,4 @@ You can add teammates to your workspace. The Seam Console sends an email invitation to the specified teammate. -{% @supademo/embed demoId="YLZEbSgX5shkgOyFb4LE9" url="https://app.supademo.com/demo/YLZEbSgX5shkgOyFb4LE9" %} +{% @supademo/embed demoid="YLZEbSgX5shkgOyFb4LE9" url="https://app.supademo.com/demo/YLZEbSgX5shkgOyFb4LE9" %} diff --git a/docs/products/access-systems/suspending-and-unsuspending-users.md b/docs/products/access-systems/suspending-and-unsuspending-users.md index 7040f356..14c242b0 100644 --- a/docs/products/access-systems/suspending-and-unsuspending-users.md +++ b/docs/products/access-systems/suspending-and-unsuspending-users.md @@ -144,9 +144,7 @@ suspend, uErr := client.Acs.Users.Suspend( **Response:** ```json -{ - "ok": true -} +void ``` {% endtab %} {% endtabs %} @@ -287,9 +285,7 @@ unsuspend, uErr := client.Acs.Users.Unsuspend( **Response:** ```json -{ - "ok": true -} +void ``` {% endtab %} {% endtabs %} diff --git a/docs/products/noise-sensors/README.md b/docs/products/noise-sensors/README.md index 032da717..ce1ec630 100644 --- a/docs/products/noise-sensors/README.md +++ b/docs/products/noise-sensors/README.md @@ -32,8 +32,7 @@ While you can theoretically set noise thresholds to any decibel value, we have f ## **Next Steps** -To learn how to set up noise thresholds for your devices, see the following guide: +See the following topics: * [Configuring Noise Threshold Settings](configure-noise-threshold-settings.md) - -For the corresponding Seam API reference, see [Noise Sensors](../../api-clients/noise_sensors/). +* [Noise Sensors API Reference](../../api-clients/noise\_sensors/) diff --git a/docs/products/smart-locks/lock-and-unlock.md b/docs/products/smart-locks/lock-and-unlock.md index 74313ec8..82b7768d 100644 --- a/docs/products/smart-locks/lock-and-unlock.md +++ b/docs/products/smart-locks/lock-and-unlock.md @@ -2,7 +2,7 @@ description: Learn how to lock and unlock a smart lock, and confirm the action's success. --- -# Locking and Unlocking +# Locking and Unlocking Smart Locks ## Overview @@ -259,7 +259,7 @@ if $(jq -r '.device.can_remotely_lock' <<< ${device}); then \ -H 'Content-Type: application/json' \ -d "{ \"device_id\": \"$(jq -r '.device.device_id' <<< ${device})\" - }'; + }"; fi ```