{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-core/json-schema/amazon-iot-core-search-index-response-schema.json",
  "title": "SearchIndexResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-core-indices-api-openapi.yml#/components/schemas/SearchIndexResponse",
  "type": "object",
  "properties": {
    "nextToken": {
      "type": "string",
      "description": "The token used to get the next set of results, or null if there are no additional results."
    },
    "things": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ThingDocument"
      },
      "description": "The things that match the search query."
    },
    "thingGroups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ThingGroupDocument"
      },
      "description": "The thing groups that match the search query."
    }
  },
  "$defs": {
    "ThingConnectivity": {
      "type": "object",
      "properties": {
        "connected": {
          "type": "boolean",
          "description": "True if the thing is connected to the Amazon Web Services IoT Core service; false if it is not connected."
        },
        "timestamp": {
          "type": "integer",
          "description": "The epoch time (in milliseconds) when the thing last connected or disconnected."
        },
        "disconnectReason": {
          "type": "string",
          "description": "The reason that the client is disconnected."
        },
        "keepAliveDuration": {
          "type": "integer",
          "description": "The keep-alive interval in seconds that the client specified when establishing the connection."
        },
        "cleanSession": {
          "type": "boolean",
          "description": "Indicates whether the client is using a clean session. Returns true for clean sessions."
        },
        "sessionExpiry": {
          "type": "integer",
          "description": "The session expiry interval in seconds for the MQTT client connection. This value indicates how long the session will remain active after the client disconnects."
        },
        "clientId": {
          "type": "string",
          "description": "The unique identifier of the MQTT client."
        }
      }
    },
    "ThingDocument": {
      "type": "object",
      "properties": {
        "thingName": {
          "type": "string",
          "description": "The thing name."
        },
        "thingId": {
          "type": "string",
          "description": "The thing ID."
        },
        "thingTypeName": {
          "type": "string",
          "description": "The thing type name."
        },
        "thingGroupNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Thing group and billing group names."
        },
        "attributes": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The attributes."
        },
        "shadow": {
          "type": "string",
          "description": "The unnamed shadow and named shadow. For more information about shadows, see IoT Device Shadow service."
        },
        "deviceDefender": {
          "type": "string",
          "description": "Contains Device Defender data. For more information about Device Defender, see Device Defender."
        },
        "connectivity": {
          "$ref": "#/$defs/ThingConnectivity"
        }
      }
    },
    "ThingGroupDocument": {
      "type": "object",
      "properties": {
        "thingGroupName": {
          "type": "string",
          "description": "The thing group name."
        },
        "thingGroupId": {
          "type": "string",
          "description": "The thing group ID."
        },
        "thingGroupDescription": {
          "type": "string",
          "description": "The thing group description."
        },
        "attributes": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The thing group attributes."
        },
        "parentGroupNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Parent group names."
        }
      }
    }
  }
}