SearchThings - AWS IoT Things Graph


Searches for things associated with the specified entity. You can search by both device and device model.

For example, if two different devices, camera1 and camera2, implement the camera device model, the user can associate thing1 to camera1 and thing2 to camera2. SearchThings(camera2) will return only thing2, but SearchThings(camera) will return both thing1 and thing2.

This action searches for exact matches and doesn't perform partial text matching.

Request Syntax

{ "entityId": "string", "maxResults": number, "namespaceVersion": 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.


The ID of the entity to which the things are associated.

The IDs should be in the following format.

urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME

Type: String

Length Constraints: Maximum length of 160.

Pattern: ^urn:tdm:(([a-z]{2}-(gov-)?[a-z]{4,9}-[0-9]{1,3}/[0-9]+/)*[\p{Alnum}_]+(/[\p{Alnum}_]+)*):([\p{Alpha}]*):([\p{Alnum}_]+(/[\p{Alnum}_]+)*)$

Required: Yes


The maximum number of results to return in the response.

Type: Integer

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

Required: No


The version of the user's namespace. Defaults to the latest version of the user's namespace.

Type: Long

Required: No


The string that specifies the next page of results. Use this when you're paginating results.

Type: String

Required: No

Response Syntax

{ "nextToken": "string", "things": [ { "thingArn": "string", "thingName": "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.


The string to specify as nextToken when you request the next page of results.

Type: String


An array of things in the result set.

Type: Array of Thing objects


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


HTTP Status Code: 500


HTTP Status Code: 400


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: