Menu
AWS IoT
Developer Guide

SearchIndex

The query search index.

Request syntax:

POST /indices/search Content-type: application/json { "indexName": "string", "queryString": "string", "nextToken": "string", "maxResults": "integer", "queryVersion": "string" }

Request Body Parameters:

Name

Type

Req?

Description

indexName

IndexName

no

The search index name.

queryString

QueryString

yes

The search query string.

nextToken

NextToken

no

The token used to get the next set of results, or null if there are no additional results.

maxResults

QueryMaxResults

no

The maximum number of results to return at one time.

queryVersion

QueryVersion

no

The query version.

Response syntax:

Content-type: application/json { "nextToken": "string", "things": [ { "thingName": "string", "thingId": "string", "thingTypeName": "string", "thingGroupNames": [ "string" ], "attributes": { "string": "string" }, "shadow": "string" } ] }

Response Body Parameters:

Name

Type

Req?

Description

nextToken

NextToken

no

The token used to get the next set of results, or null if there are no additional results.

things

ThingDocumentList

no

The things that match the search query.

Errors:

InvalidRequestException

The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.

HTTP response code: 400

ThrottlingException

The rate exceeds the limit.

HTTP response code: 429

UnauthorizedException

You are not authorized to perform this operation.

HTTP response code: 401

ServiceUnavailableException

The service is temporarily unavailable.

HTTP response code: 503

InternalFailureException

An unexpected error has occurred.

HTTP response code: 500

ResourceNotFoundException

The specified resource does not exist.

HTTP response code: 404

InvalidQueryException

The query is invalid.

HTTP response code: 400

IndexNotReadyException

The index is not ready.

HTTP response code: 400

CLI

Synopsis:

aws iot search-index \ [--index-name <value>] \ --query-string <value> \ [--next-token <value>] \ [--max-results <value>] \ [--query-version <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "indexName": "string", "queryString": "string", "nextToken": "string", "maxResults": "integer", "queryVersion": "string" }

cli-input-json fields:

Name

Type

Description

indexName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

The search index name.

queryString

string

length max:1000 min:1

The search query string.

nextToken

string

The token used to get the next set of results, or null if there are no additional results.

maxResults

integer

java class: java.lang.Integer

range- max:500 min:1

The maximum number of results to return at one time.

queryVersion

string

The query version.

Output:

{ "nextToken": "string", "things": [ { "thingName": "string", "thingId": "string", "thingTypeName": "string", "thingGroupNames": [ "string" ], "attributes": { "string": "string" }, "shadow": "string" } ] }

cli output fields:

Name

Type

Description

nextToken

string

The token used to get the next set of results, or null if there are no additional results.

things

list

member: ThingDocument

java class: java.util.List

The things that match the search query.

ThingDocument

ThingDocument

thingName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

The thing name.

thingId

string

The thing ID.

thingTypeName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

The thing type name.

thingGroupNames

list

member: ThingGroupName

java class: java.util.List

Thing group names.

ThingGroupName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

attributes

map

key: AttributeName

value: AttributeValue

The attributes.

AttributeName

string

length max:128

pattern: [a-zA-Z0-9_.,@/:#-]+

AttributeValue

string

length max:800

pattern: [a-zA-Z0-9_.,@/:#-]*

shadow

string

The shadow.

On this page: