Device Events - AWS IoT 1-Click

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
NameTypeRequiredDescription
deviceIdStringTrue

The unique identifier of the device.

Query parameters
NameTypeRequiredDescription
nextTokenStringFalse

The token to retrieve the next set of results.

maxResultsStringFalse

The maximum number of results to return per request. If not set, a default value of 100 is used.

fromTimeStampStringTrue

The start date for the device event query, in ISO8061 format. For example, 2018-03-28T15:45:12.880Z

toTimeStampStringTrue

The end date for the device event query, in ISO8061 format. For example, 2018-03-28T15:45:12.880Z

Responses
Status codeResponse modelDescription
200DeviceEventsResponse

200 response

400InvalidRequestException

400 response

404ResourceNotFoundException

404 response

416RangeNotSatisfiableException

416 response

500InternalFailureException

500 response

OPTIONS

Responses
Status codeResponse modelDescription
200None

200 response

Schemas

Response bodies

{ "nextToken": "string", "events": [ { "stdEvent": "string", "device": { "attributes": { }, "type": "string", "deviceId": "string" } } ] }
{ "code": "string", "message": "string" }
{ "code": "string", "message": "string" }
{ "code": "string", "message": "string" }
{ "code": "string", "message": "string" }

Properties

Device

PropertyTypeRequiredDescription
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

PropertyTypeRequiredDescription
device

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

PropertyTypeRequiredDescription
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

PropertyTypeRequiredDescription
code

string

False

500

message

string

False

The 500 error message returned by the web server.

InvalidRequestException

PropertyTypeRequiredDescription
code

string

False

400

message

string

False

The 400 error message returned by the web server.

RangeNotSatisfiableException

PropertyTypeRequiredDescription
code

string

False

416

message

string

False

The requested number of results specified by nextToken cannot be satisfied.

ResourceNotFoundException

PropertyTypeRequiredDescription
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:

ListDeviceEvents