Skip to content

Commit

Permalink
GITBOOK-457: Add simulate endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x authored and gitbook-bot committed Oct 4, 2024
1 parent 7839417 commit f60a851
Show file tree
Hide file tree
Showing 8 changed files with 777 additions and 16 deletions.
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions docs/core-concepts/devices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
6 changes: 5 additions & 1 deletion docs/core-concepts/devices/displaying-device-health.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

<table><thead><tr><th width="162">Parameter</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>device_id</code></td><td>String (UUID)</td><td>ID of the device for which you want to retrieve <code>device.connected</code> or <code>device.disconnected</code> events</td></tr><tr><td><code>event_type</code></td><td>String</td><td>Event type that you want to retrieve, that is, <code>device.connected</code> or <code>device.disconnected</code></td></tr><tr><td><code>since</code></td><td>String</td><td>Desired starting event generation date and time<br>You must include <code>since</code> or <code>between</code>.</td></tr><tr><td><code>between</code></td><td>Set of two strings</td><td>Desired starting and ending event generation dates and times<br>For example:<br><code>["2024-01-01T00:00:00Z", "2024-02-01T00:00:00Z"]</code><br>You must include <code>between</code> or <code>since</code>.</td></tr></tbody></table>
<table><thead><tr><th width="162">Parameter</th><th width="161">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>device_id</code></td><td>String (UUID)</td><td>ID of the device for which you want to retrieve <code>device.connected</code> or <code>device.disconnected</code> events</td></tr><tr><td><code>event_type</code></td><td>String</td><td>Event type that you want to retrieve, that is, <code>device.connected</code> or <code>device.disconnected</code></td></tr><tr><td><code>since</code></td><td>String</td><td>Desired starting event generation date and time<br>You must include <code>since</code> or <code>between</code>.</td></tr><tr><td><code>between</code></td><td>Set of two strings</td><td>Desired starting and ending event generation dates and times<br>For example:<br><code>["2024-01-01T00:00:00Z", "2024-02-01T00:00:00Z"]</code><br>You must include <code>between</code> or <code>since</code>.</td></tr></tbody></table>

The following example uses the List Events request to retrieve all `device.connected` events for a specific device since January 1, 2024:

Expand Down
Loading

0 comments on commit f60a851

Please sign in to comment.