Device Events
Represents a collection of events associated with the device. A device event is the event published by a device which are translated into a standard device-type event by the AWS IoT 1-Click service.
URI
/devices/
deviceId
/events
HTTP methods
GET
Operation ID: ListDeviceEvents
Using a device ID, returns a DeviceEventsResponse
object containing an
array of events for the device.
Path parameters | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deviceId | String | True | The unique identifier of the device. |
Query parameters | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nextToken | String | False | The token to retrieve the next set of results. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxResults | String | False | The maximum number of results to return per request. If not set, a default value of 100 is used. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fromTimeStamp | String | True | The start date for the device event query, in ISO8061 format. For example,
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
toTimeStamp | String | True | The end date for the device event query, in ISO8061 format. For example,
|
Responses | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Status code | Response model | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
200 | DeviceEventsResponse | 200 response | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
400 | InvalidRequestException | 400 response | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
404 | ResourceNotFoundException | 404 response | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
416 | RangeNotSatisfiableException | 416 response | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
500 | InternalFailureException | 500 response |
OPTIONS
Responses | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Status code | Response model | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
200 | None | 200 response |
Schemas
Response bodies
{ "nextToken": "string", "events": [ { "stdEvent": "string", "device": { "attributes": { }, "type": "string", "deviceId": "string" } } ] }
Properties
Device
Property | Type | Required | Description |
---|---|---|---|
attributes | object | False | The user specified attributes associated with the device for an event. |
deviceId | string | False | The unique identifier of the device. |
type | string | False | The device type, such as "button". |
DeviceEvent
Property | Type | Required | Description |
---|---|---|---|
device | False | An object representing the device associated with the event. | |
stdEvent | string | False | A serialized JSON object representing the device-type specific event. |
DeviceEventsResponse
Property | Type | Required | Description |
---|---|---|---|
events | Array of type DeviceEvent | False | An array of zero or more elements describing the event(s) associated with the device. |
nextToken | string | False | The token to retrieve the next set of results. |
InternalFailureException
Property | Type | Required | Description |
---|---|---|---|
code | string | False | 500 |
message | string | False | The 500 error message returned by the web server. |
InvalidRequestException
Property | Type | Required | Description |
---|---|---|---|
code | string | False | 400 |
message | string | False | The 400 error message returned by the web server. |
RangeNotSatisfiableException
Property | Type | Required | Description |
---|---|---|---|
code | string | False | 416 |
message | string | False | The requested number of results specified by |
ResourceNotFoundException
Property | Type | Required | Description |
---|---|---|---|
code | string | False | 404 |
message | string | False | The requested device could not be found. |
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following: