AWS IoT 1-Click
Devices API Reference

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, 2018-03-28T15:45:12.880Z

toTimeStamp String True

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

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

See Also

OPTIONS

Responses

Status Code Response Model Description
200 None

200 response

Schemas

Response Bodies

Example DeviceEventsResponse

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

Example InvalidRequestException

{ "code": "string", "message": "string" }

Example ResourceNotFoundException

{ "code": "string", "message": "string" }

Example RangeNotSatisfiableException

{ "code": "string", "message": "string" }

Example InternalFailureException

{ "code": "string", "message": "string" }

Properties

Device

Property Type Required Description
attributes

object

False

The user specified attributes associated with the device for an event.

type

string

False

The device type, such as "button".

deviceId

string

False

The unique identifier of the device.

See Also

DeviceEvent

Property Type Required Description
stdEvent

string

False

A serialized JSON object representing the device-type specific event.

device

Device

False

An object representing the device associated with the event.

See Also

DeviceEventsResponse

Property Type Required Description
nextToken

string

False

The token to retrieve the next set of results.

events

Array of type DeviceEvent

False

An array of zero or more elements describing the event(s) associated with the device.

See Also

InternalFailureException

Property Type Required Description
code

string

False

500

message

string

False

The 500 error message returned by the web server.

See Also

InvalidRequestException

Property Type Required Description
code

string

False

400

message

string

False

The 400 error message returned by the web server.

See Also

RangeNotSatisfiableException

Property Type Required Description
code

string

False

416

message

string

False

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

See Also

ResourceNotFoundException

Property Type Required Description
code

string

False

404

message

string

False

The requested device could not be found.

See Also