List Events

List events emitted within your workspace

/events/list

POSThttps://connect.getseam.com/events/list
Authorization
Body
sincestring
betweenarray of one of
device_idstring (uuid)
device_idsarray of string (uuid)
access_code_idstring (uuid)
access_code_idsarray of string (uuid)
event_typeenum
device.accessory_keypad_connecteddevice.accessory_keypad_disconnecteddevice.connecteddevice.unmanaged.connecteddevice.disconnecteddevice.unmanaged.disconnecteddevice.converted_to_unmanageddevice.unmanaged.converted_to_manageddevice.removeddevice.deleteddevice.tampereddevice.low_batterydevice.battery_status_changeddevice.third_party_integration_detecteddevice.third_party_integration_no_longer_detecteddevice.salto.privacy_mode_activateddevice.salto.privacy_mode_deactivateddevice.connection_became_flakydevice.connection_stabilizeddevice.error.subscription_requireddevice.error.subscription_required.resolvedaccess_code.createdaccess_code.changedaccess_code.scheduled_on_deviceaccess_code.set_on_deviceaccess_code.deletedaccess_code.removed_from_deviceaccess_code.failed_to_set_on_deviceaccess_code.delay_in_setting_on_deviceaccess_code.failed_to_remove_from_deviceaccess_code.delay_in_removing_from_deviceaccess_code.deleted_external_to_seamaccess_code.modified_external_to_seamaccess_code.unmanaged.converted_to_managedaccess_code.unmanaged.failed_to_convert_to_managedaccess_code.unmanaged.createdaccess_code.unmanaged.removedlock.lockedlock.unlockedlock.access_deniedphone.deactivatedconnected_account.connectedconnected_account.successful_loginconnected_account.createdconnected_account.deletedconnected_account.disconnectedconnected_account.completed_first_syncconnected_account.completed_first_sync_after_reconnectionconnect_webview.login_succeededconnect_webview.login_failednoise_sensor.noise_threshold_triggeredaccess_code.backup_access_code_pulledacs_system.connectedacs_user.deletedacs_credential.deletedenrollment_automation.deletedclient_session.deletedaction_attempt.lock_door.succeededaction_attempt.lock_door.failedaction_attempt.unlock_door.succeededaction_attempt.unlock_door.failed
event_typesarray of enum
connected_account_idstring (uuid)
connect_webview_idstring (uuid)
limitnumber (float)
Response

OK

Body
events*array of event (object)
ok*boolean
Request
const response = await fetch('https://connect.getseam.com/events/list', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer Client Session Token",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "events": [
    {
      "event_id": "123e4567-e89b-12d3-a456-426614174000",
      "device_id": "123e4567-e89b-12d3-a456-426614174000",
      "action_attempt_id": "123e4567-e89b-12d3-a456-426614174000",
      "acs_credential_id": "123e4567-e89b-12d3-a456-426614174000",
      "acs_user_id": "123e4567-e89b-12d3-a456-426614174000",
      "acs_system_id": "123e4567-e89b-12d3-a456-426614174000",
      "client_session_id": "123e4567-e89b-12d3-a456-426614174000",
      "enrollment_automation_id": "123e4567-e89b-12d3-a456-426614174000",
      "event_type": "text",
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2024-09-19T18:44:10.047Z",
      "occurred_at": "2024-09-19T18:44:10.047Z",
      "event_description": "text"
    }
  ],
  "ok": false
}

Request

To access events programmatically, use events.list. This endpoint returns the same events that would be sent to a webhook, but events.list enables you to filter or see events that already took place.

Request Body Parameters

ParameterTypeDescription

since

String Optional

Timestamp since when events were generated. You must include since or between.

between

[String, String] Optional

Lower and upper timestamps by which to filter (exclusive interval). You must include since or between.

device_id

String Optional

ID of the devices to include.

device_ids

String[] Optional

IDs of the devices to include.

access_code_id

String Optional

ID of the access code to include.

access_code_ids

String[] Optional

IDs of the access codes to include.

connected_account_id

String Optional

ID of the connected account to include.

connect_webview_id

String Optional

ID of the Connect Webview to include.

event_type

String Optional

Type of events to include.

event_types

String[] Optional

Types of events to include.

limit

Number Optional

Limit of events to return. Default: 500.

Sample Request

await seam.events.list()

/*
[
  {
    event_id: '87b2dcda-90ff-4602-8ccc-efb2f4a3d7c2',
    event_type: 'device.low_battery',
    created_at: '2022-08-24T11:23:49.459Z',
    device_id: 'a83690b2-2b70-409a-9a94-426699b84c97',
    workspace_id: 'f97073eb-c003-467a-965b-e6dba3a0131d',
    battery_level: 0.48
  },
  {
    event_id: '2fc8d1bc-7b4d-4960-9aa4-7e6bf5dc5848',
    event_type: 'device.low_battery',
    created_at: '2022-08-24T11:23:49.335Z',
    device_id: 'a3f30bd2-f6d7-4bad-ba89-1bad3bf1bce4',
    workspace_id: 'f97073eb-c003-467a-965b-e6dba3a0131d',
    battery_level: 0.48
  }
]
*/

Response

Returns an events array.

Sample Response

{
  "events": [
    {
      "event_id": "87b2dcda-90ff-4602-8ccc-efb2f4a3d7c2",
      "event_type": "device.low_battery",
      "created_at": "2022-08-24T11:23:49.459Z",
      "device_id": "a83690b2-2b70-409a-9a94-426699b84c97",
      "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d",
      "battery_level": 0.48
    },
    {
      "event_id": "2fc8d1bc-7b4d-4960-9aa4-7e6bf5dc5848",
      "event_type": "device.low_battery",
      "created_at": "2022-08-24T11:23:49.335Z",
      "device_id": "a3f30bd2-f6d7-4bad-ba89-1bad3bf1bce4",
      "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d",
      "battery_level": 0.48
    },
    {
      "event_id": "c99b497b-5ff6-4658-854a-4ee694d35355",
      "event_type": "device.low_battery",
      "created_at": "2022-08-24T11:23:49.150Z",
      "device_id": "65803a1c-866b-45ed-94d5-496b40e4cc4d",
      "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d",
      "battery_level": 0.48
    },
    {
      "event_id": "e52e2527-c905-43e5-b84a-87122b64cdda",
      "event_type": "device.connected",
      "created_at": "2022-08-24T11:14:37.119Z",
      "device_id": "a83690b2-2b70-409a-9a94-426699b84c97",
      "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d"
    },
    {
      "event_id": "5d9dce4c-9119-4888-acd6-42044c9740b0",
      "event_type": "device.connected",
      "created_at": "2022-08-24T11:14:36.981Z",
      "device_id": "a3f30bd2-f6d7-4bad-ba89-1bad3bf1bce4",
      "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d"
    },
    {
      "event_id": "fea998c1-e2c7-454d-9173-8a85726aff75",
      "event_type": "device.connected",
      "created_at": "2022-08-24T11:14:36.796Z",
      "device_id": "65803a1c-866b-45ed-94d5-496b40e4cc4d",
      "workspace_id": "f97073eb-c003-467a-965b-e6dba3a0131d"
    }
  ],
  "ok": true
}

Last updated

Logo

© Seam Labs, Inc. All rights reserved.

Revision created on 8/25/2024