SearchEntities
Searches for entities of the specified type. You can search for entities in your namespace and the public namespace that you're tracking.
Request Syntax
{
"entityTypes": [ "string
" ],
"filters": [
{
"name": "string
",
"value": [ "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.
- entityTypes
-
The entity types for which to search.
Type: Array of strings
Valid Values:
DEVICE | SERVICE | DEVICE_MODEL | CAPABILITY | STATE | ACTION | EVENT | PROPERTY | MAPPING | ENUM
Required: Yes
- filters
-
Optional filter to apply to the search. Valid filters are
NAME
NAMESPACE
,SEMANTIC_TYPE_PATH
andREFERENCED_ENTITY_ID
.REFERENCED_ENTITY_ID
filters on entities that are used by the entity in the result set. For example, you can filter on the ID of a property that is used in a state.Multiple filters function as OR criteria in the query. Multiple values passed inside the filter function as AND criteria.
Type: Array of EntityFilter objects
Required: No
- maxResults
-
The maximum number of results to return in the response.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 250.
Required: No
- namespaceVersion
-
The version of the user's namespace. Defaults to the latest version of the user's namespace.
Type: Long
Required: No
- nextToken
-
The string that specifies the next page of results. Use this when you're paginating results.
Type: String
Required: No
Response Syntax
{
"descriptions": [
{
"arn": "string",
"createdAt": number,
"definition": {
"language": "string",
"text": "string"
},
"id": "string",
"type": "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.
- descriptions
-
An array of descriptions for each entity returned in the search result.
Type: Array of EntityDescription objects
- nextToken
-
The string to specify as
nextToken
when you request the next page of results.Type: String
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalFailureException
-
HTTP Status Code: 500
- InvalidRequestException
-
HTTP Status Code: 400
- ThrottlingException
-
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: