Azure Log Analytics · JSON Structure

Query Api Query Body Structure

Request body for executing a KQL query against a Log Analytics workspace.

Type: object Properties: 3 Required: 1
AnalyticsAzureCloudLoggingMonitoring

QueryBody is a JSON Structure definition published by Azure Log Analytics, describing 3 properties, of which 1 is required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

query timespan workspaces

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/azure-log-analytics/refs/heads/main/json-structure/query-api-query-body-structure.json",
  "name": "QueryBody",
  "description": "Request body for executing a KQL query against a Log Analytics workspace.",
  "type": "object",
  "required": ["query"],
  "properties": {
    "query": {
      "type": "string",
      "description": "The KQL query to execute against the workspace."
    },
    "timespan": {
      "type": "string",
      "description": "ISO 8601 duration or time interval for the query timespan."
    },
    "workspaces": {
      "type": "array",
      "description": "List of additional workspace IDs for cross-workspace queries.",
      "items": {
        "type": "string"
      }
    }
  }
}