Alexa For Business
Alexa for Business API (API Version 2017-11-09)

ListDeviceEvents

Lists the device event history, including device connection status, for up to 30 days.

Request Syntax

{ "DeviceArn": "string", "EventType": "string", "MaxResults": number, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

DeviceArn

The ARN of a device.

Type: String

Pattern: arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[^/].{0,1023}

Required: Yes

EventType

The event type to filter device events. If EventType isn't specified, this returns a list of all device events in reverse chronological order. If EventType is specified, this returns a list of device events for that EventType in reverse chronological order.

Type: String

Valid Values: CONNECTION_STATUS | DEVICE_STATUS

Required: No

MaxResults

The maximum number of results to include in the response. The default value is 50. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 50.

Required: No

NextToken

An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response only includes results beyond the token, up to the value specified by MaxResults. When the end of results is reached, the response has a value of null.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1000.

Required: No

Response Syntax

{ "DeviceEvents": [ { "Timestamp": number, "Type": "string", "Value": "string" } ], "NextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

DeviceEvents

The device events requested for the device ARN.

Type: Array of DeviceEvent objects

NextToken

The token returned to indicate that there is more data available.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1000.

Errors

For information about the errors that are common to all actions, see Common Errors.

NotFoundException

The resource is not found. HTTP Status Code: 400

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: