Apache Druid · JSON Structure

Apache Druid Sql Query Request Structure

Request body for the Apache Druid SQL query API (POST /druid/v2/sql).

Type: object Properties: 7 Required: 1
AnalyticsApacheDatabaseKafkaOLAPOpen-SourceReal-TimeSQLTime Series

SqlQueryRequest is a JSON Structure definition published by Apache Druid, describing 7 properties, of which 1 is required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

query resultFormat header typesHeader sqlTypesHeader context parameters

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/apache-druid/refs/heads/main/json-structure/apache-druid-sql-query-request-structure.json",
  "name": "SqlQueryRequest",
  "description": "Request body for the Apache Druid SQL query API (POST /druid/v2/sql).",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "SQL query string to execute.",
      "example": "SELECT __time, page, added FROM wikipedia WHERE __time > '2015-09-12' LIMIT 10"
    },
    "resultFormat": {
      "type": "string",
      "description": "Format for the query results.",
      "enum": [
        "object",
        "array",
        "objectLines",
        "arrayLines",
        "csv"
      ],
      "default": "object",
      "example": "object"
    },
    "header": {
      "type": "boolean",
      "description": "Whether to return column names in the first row (for array/objectLines formats).",
      "default": false,
      "example": false
    },
    "typesHeader": {
      "type": "boolean",
      "description": "Whether to include column data types in a header row.",
      "default": false,
      "example": false
    },
    "sqlTypesHeader": {
      "type": "boolean",
      "description": "Whether to include SQL type names in a header row.",
      "default": false,
      "example": false
    },
    "context": {
      "type": "object",
      "description": "Query context parameters for controlling execution behavior.",
      "properties": {
        "timeout": {
          "type": "int32",
          "description": "Query timeout in milliseconds.",
          "example": 30000
        },
        "priority": {
          "type": "int32",
          "description": "Query priority (lower is higher priority).",
          "example": 0
        },
        "queryId": {
          "type": "string",
          "description": "Custom query ID for tracking.",
          "example": "my-query-001"
        }
      }
    },
    "parameters": {
      "type": "array",
      "description": "Parameterized query values.",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "example": "VARCHAR"
          },
          "value": {
            "type": "string",
            "example": "en"
          }
        }
      }
    }
  },
  "required": [
    "query"
  ]
}

Work with this as data

Every JSON Structure here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for json structure

4 MCP tools reach this
  • find_json_structuresBrowse and filter every JSON Structure in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Structure
curl "https://apis.io/api/v1/json-structures/apache-druid-sql-query-request-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.