POST /api/v202609/workbench/validate

Checks a Workbench Data Explorer KQL query for errors without running it, with each error's position in the query

ValidateWorkbenchQueryV202609
Use this endpoint to report errors while a query is being written, so the editor can underline them. The query is translated exactly as POST workbench/query translates it - including checking table and column names against the schema - but it is not run. Each error’s position and length are 0-based character offsets into the query as sent (including [Name With Spaces] identifiers); errors that aren’t tied to a place in the query, such as an unsupported operator, have none. Failures are not logged, since most checks are of unfinished queries. Restricted to ENC staff.

Request Headers

Header Value Required Description
ECI-ApiKey string Yes Your API key. See Authentication.
Content-Type application/json Yes All requests must specify JSON content type, including the request body.

Request Body

EdxQueryRequestV202606
Property Description Type
kql The KQL query text. string
limit Optional row cap (defaults applied server-side; hard-capped at 100k). integer (int32)
Example Request Body application/json
{  "kql": "string",  "limit": 1
}

Responses

200 OK The request succeeded and the response body contains the requested data.

Response Body Parameters

EdxValidationResultV202606
Property Description Type
errors EdxDiagnosticV202606[]
EdxDiagnosticV202606 properties
Property Description Type
code string
length Length of the problematic text, if known. integer (int32)
message string
position Character offset in the KQL text where the issue starts, if known. integer (int32)
valid boolean
warnings EdxDiagnosticV202606[]
EdxDiagnosticV202606 properties
Property Description Type
code string
length Length of the problematic text, if known. integer (int32)
message string
position Character offset in the KQL text where the issue starts, if known. integer (int32)
Example Response application/json
{  "errors": [
    {    "code": "string",    "length": 1,    "message": "string",    "position": 1
  }
  ],  "valid": false,  "warnings": [
    {    "code": "string",    "length": 1,    "message": "string",    "position": 1
  }
  ]
}