Ask or search…
K
Links

Get an Event

Get a specific event emitted within a users workspace
get
https://connect.getseam.com
/events/get
Get Events

Code Example

To programmatically access a single event, you can use events.get . This will return the same event that would be sent to a webhook, however events.get allows you to retrieve an event that already took place.
Javascript
await seam.events.get('87b2dcda-90ff-4602-8ccc-efb2f4a3d7c2')
/*
{
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
}
*/

Response

This section shows the JSON response returned by the API. Since each language encapsulates this response inside objects specific to that language and/or implementation, the actual type in your language might differ from what’s written here.

JSON format

JSON
{
"event": {
"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
},
"ok": true
}