{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-start-search-request-schema.json",
  "title": "StartSearchRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-searches-api-openapi.yml#/components/schemas/StartSearchRequest",
  "type": "object",
  "properties": {
    "workspaceName": {
      "type": "string",
      "description": "The name of the workspace whose data is searched."
    },
    "queryStatement": {
      "type": "string",
      "description": "The natural-language query describing the data to search for."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier you provide to ensure the request is idempotent. Repeating a StartSearch call with the same clientToken returns the original search rather than starting a new one. If omitted, the SDK autogenerates one."
    },
    "searchType": {
      "type": "string",
      "enum": [
        "DEEP",
        "QUICK"
      ],
      "description": "The search strategy to use. Defaults to QUICK when omitted."
    },
    "searchFilters": {
      "$ref": "#/$defs/SearchFilters"
    },
    "groupId": {
      "type": "string",
      "description": "An optional caller-supplied identifier used to group related searches together."
    }
  },
  "required": [
    "workspaceName",
    "queryStatement"
  ],
  "$defs": {
    "SearchFilters": {
      "type": "object",
      "properties": {
        "timeSeriesIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Restricts the search to these time series."
        },
        "datasetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Restricts the search to these datasets."
        },
        "timeIntervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TimeInterval"
          },
          "description": "Restricts the search to these time intervals."
        }
      }
    },
    "TimeInNanos": {
      "type": "object",
      "properties": {
        "timeInSeconds": {
          "type": "integer",
          "description": "The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos."
        },
        "offsetInNanos": {
          "type": "integer",
          "description": "The nanosecond offset from timeInSeconds."
        }
      },
      "required": [
        "timeInSeconds"
      ]
    },
    "TimeInterval": {
      "type": "object",
      "properties": {
        "startTime": {
          "$ref": "#/$defs/TimeInNanos"
        },
        "endTime": {
          "$ref": "#/$defs/TimeInNanos"
        }
      },
      "required": [
        "startTime",
        "endTime"
      ]
    }
  }
}