---
title: Get Events
slug: jetstream-v2/get-events
docTags: 
createdAt: 2024-01-23T15:42:03.428Z
---

## About

Return, but do not dequeue, the oldest pending event messages for the Jetstream user whose access key is being used. By default, no more than 100 messages will be returned on any given Get Events request.

Users must subscribe to Get Events by making an initial Get Events request with the applicable user access key. This initial subscription request will not return any events, as events are not queued until the subscription is created. Users will be automatically unsubscribed after 30 days of not making a Get Events request.

**More Info**

Each Get Events request returns a batch of event messages along with an associated batch ID. By using this batch ID with a [Delete Events](docId:1Z8WLWMzogUY-dPo9sqGK) request, all events within this batch can be removed.

## Parameters

| **Property**                                                        | **Location** | **Details**                                                                                                                                                                                                                        |
| ------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AccessKey**<br />:::BlockQuote
string&#xA;Required&#xA;Unique
::: | Header       | The access key for your user account.<br />This value is a 36-character GUID provided during [user account sign up](https://jetstreamrfid.com/login/signup).                                                                       |
| **Limit**<br />:::BlockQuote
int
:::                                | URL          | The number of messages to return.<br />This value is a number within the following range: 1 - 512<br />This property is optional and does not need to be defined in all requests. If it is not defined, the value defaults to 100. |
| **Type**<br />:::BlockQuote
string&#xA;Searchable
:::               | URL          | The event type.                                                                                                                                                                                                                    |
| **Device**<br />:::BlockQuote
string&#xA;Searchable
:::             | URL          | The name of the device.                                                                                                                                                                                                            |

## Example

### Request URL

**GET** https\://api.jetstreamrfid.com/2/events/5

### Request Body

None Required

### Response Code

200 OK

### Response Body

:::BlockQuote
\{
&#x20;   "BatchId": "c15d316b-5fc3-4a7f-a2ba-b1a96aabcd32",
&#x20;   "Count": 5,
&#x20;   "Events": \[
&#x20;       \{
&#x20;           "CommandId": "2bf00848-b06a-4820-86fc-58c12e08ee3e",
&#x20;           "CommandName": "SetConfigValuesCommand",
&#x20;           "OutputParameterList": \[],
&#x20;           "ExceptionList": \[],
&#x20;           "Device": "MyDeviceName1",
&#x20;           "ReceivedTime": "2017-05-19T01:16:23Z",
&#x20;           "Type": "CommandCompletionEvent",
&#x20;           "EventId": "93723c89-cb44-44f0-8d86-87ede0fb3ba6",
&#x20;           "EventTime": "2017-05-19T01:16:19Z"
&#x20;       },
&#x20;       \{
&#x20;           "Device": "MyDeviceName1",
&#x20;           "CommandId": "2bf00848-b06a-4820-86fc-58c12e08ee3e",
&#x20;           "CommandName": "SetConfigValuesCommand",
&#x20;           "URI": "/2/Devices/MyDeviceName1/policy/sync",
&#x20;           "Verb": "Post",
&#x20;           "User": "MyUserName",
&#x20;           "Parameters": \[
&#x20;               \{
&#x20;                   "Key": "aggregateeventscancount",
&#x20;                   "Value": "4"
&#x20;               }
&#x20;           ],
&#x20;           "Type": "CommandQueuedEvent",
&#x20;           "EventId": "f3df515b-c53a-4b3b-b3e9-01ffe6ffd8f3",
&#x20;           "EventTime": "2017-05-19T01:16:21Z"
&#x20;       },
&#x20;       \{
&#x20;           "Device": "MyDeviceName2",
&#x20;           "ReceivedTime": "2017-05-19T01:19:44Z",
&#x20;           "Type": "HeartbeatEvent",
&#x20;           "EventId": "b55cf245-4a17-438e-8b12-538c3ef6f536",
&#x20;           "EventTime": "2017-05-19T01:19:43Z"
&#x20;       },
&#x20;       \{
&#x20;           "Device": "MyDeviceName1",
&#x20;           "ReceivedTime": "2017-05-19T02:05:40Z",
&#x20;           "Type": "HeartbeatEvent",
&#x20;           "EventId": "9e5d2294-655e-4a11-ba02-e504b435e75f",
&#x20;           "EventTime": "2017-05-19T02:05:36Z"
&#x20;       },
&#x20;       \{
&#x20;           "SensorReadings": \[
&#x20;               \{
&#x20;                   "Name": "TemperatureA",
&#x20;                   "Value": "-16",
&#x20;                   "ReadingTime": "2017-05-19T02:06:25Z"
&#x20;               },
&#x20;               \{
&#x20;                   "Name": "TemperatureB",
&#x20;                   "Value": "-61",
&#x20;                   "ReadingTime": "2017-05-19T02:06:25Z"
&#x20;               }
&#x20;           ],
&#x20;           "Device": "MyDeviceName1",
&#x20;           "ReceivedTime": "2017-05-19T02:06:28Z",
&#x20;           "Type": "SensorReadingEvent",
&#x20;           "EventId": "66524199-0c71-40d2-a36a-c05983b70355",
&#x20;           "EventTime": "2017-05-19T02:06:25Z"
&#x20;       }
&#x20;   ]
}
:::

## Version Changes

Replaces GetEvents

## Example

### Request URL

**GET** https\://api.jetstreamrfid.com/2/events/5

### Request Body

None Required

### Response Code

200 OK

### Response Body

:::BlockQuote
\{
&#x20;   "BatchId": "c15d316b-5fc3-4a7f-a2ba-b1a96aabcd32",
&#x20;   "Count": 5,
&#x20;   "Events": \[
&#x20;       \{
&#x20;           "CommandId": "2bf00848-b06a-4820-86fc-58c12e08ee3e",
&#x20;           "CommandName": "SetConfigValuesCommand",
&#x20;           "OutputParameterList": \[],
&#x20;           "ExceptionList": \[],
&#x20;           "Device": "MyDeviceName1",
&#x20;           "ReceivedTime": "2017-05-19T01:16:23Z",
&#x20;           "Type": "CommandCompletionEvent",
&#x20;           "EventId": "93723c89-cb44-44f0-8d86-87ede0fb3ba6",
&#x20;           "EventTime": "2017-05-19T01:16:19Z"
&#x20;       },
&#x20;       \{
&#x20;           "Device": "MyDeviceName1",
&#x20;           "CommandId": "2bf00848-b06a-4820-86fc-58c12e08ee3e",
&#x20;           "CommandName": "SetConfigValuesCommand",
&#x20;           "URI": "/2/Devices/MyDeviceName1/policy/sync",
&#x20;           "Verb": "Post",
&#x20;           "User": "MyUserName",
&#x20;           "Parameters": \[
&#x20;               \{
&#x20;                   "Key": "aggregateeventscancount",
&#x20;                   "Value": "4"
&#x20;               }
&#x20;           ],
&#x20;           "Type": "CommandQueuedEvent",
&#x20;           "EventId": "f3df515b-c53a-4b3b-b3e9-01ffe6ffd8f3",
&#x20;           "EventTime": "2017-05-19T01:16:21Z"
&#x20;       },
&#x20;       \{
&#x20;           "Device": "MyDeviceName2",
&#x20;           "ReceivedTime": "2017-05-19T01:19:44Z",
&#x20;           "Type": "HeartbeatEvent",
&#x20;           "EventId": "b55cf245-4a17-438e-8b12-538c3ef6f536",
&#x20;           "EventTime": "2017-05-19T01:19:43Z"
&#x20;       },
&#x20;       \{
&#x20;           "Device": "MyDeviceName1",
&#x20;           "ReceivedTime": "2017-05-19T02:05:40Z",
&#x20;           "Type": "HeartbeatEvent",
&#x20;           "EventId": "9e5d2294-655e-4a11-ba02-e504b435e75f",
&#x20;           "EventTime": "2017-05-19T02:05:36Z"
&#x20;       },
&#x20;       \{
&#x20;           "SensorReadings": \[
&#x20;               \{
&#x20;                   "Name": "TemperatureA",
&#x20;                   "Value": "-16",
&#x20;                   "ReadingTime": "2017-05-19T02:06:25Z"
&#x20;               },
&#x20;               \{
&#x20;                   "Name": "TemperatureB",
&#x20;                   "Value": "-61",
&#x20;                   "ReadingTime": "2017-05-19T02:06:25Z"
&#x20;               }
&#x20;           ],
&#x20;           "Device": "MyDeviceName1",
&#x20;           "ReceivedTime": "2017-05-19T02:06:28Z",
&#x20;           "Type": "SensorReadingEvent",
&#x20;           "EventId": "66524199-0c71-40d2-a36a-c05983b70355",
&#x20;           "EventTime": "2017-05-19T02:06:25Z"
&#x20;       }
&#x20;   ]
}
:::

## Version Changes

Replaces GetEvents
