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

SearchDevices

Searches devices and lists the ones that meet a set of filter criteria.

Request Syntax

{
   "Filters": [ 
      { 
         "Key": "string",
         "Values": [ "string" ]
      }
   ],
   "MaxResults": number,
   "NextToken": "string",
   "SortCriteria": [ 
      { 
         "Key": "string",
         "Value": "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.

Filters

The filters to use to list a specified set of devices. Supported filter keys are DeviceName, DeviceStatus, RoomName, DeviceType, DeviceSerialNumber, and UnassociatedOnly.

Type: Array of Filter objects

Array Members: Maximum number of 25 items.

Required: No

MaxResults

The maximum number of results to include in the response. 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 includes only results beyond the token, up to the value specified by MaxResults.

Type: String

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

Required: No

SortCriteria

The sort order to use in listing the specified set of devices. Supported sort keys are DeviceName, DeviceStatus, RoomName, DeviceType, and DeviceSerialNumber.

Type: Array of Sort objects

Array Members: Maximum number of 25 items.

Required: No

Response Syntax

{
   "Devices": [ 
      { 
         "DeviceArn": "string",
         "DeviceName": "string",
         "DeviceSerialNumber": "string",
         "DeviceStatus": "string",
         "DeviceType": "string",
         "MacAddress": "string",
         "RoomArn": "string",
         "RoomName": "string",
         "SoftwareVersion": "string"
      }
   ],
   "NextToken": "string",
   "TotalCount": number
}

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.

Devices

The devices that meet the specified set of filter criteria, in sort order.

Type: Array of DeviceData 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.

TotalCount

The total number of devices returned.

Type: Integer

Errors

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

See Also

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