QueryDiagnostic is a datatype for a diagnostic message from query validation.

This datatype is used by two datatypes: QueryValidationResult, which is used by the validateQuery() query field; and SourceEventsQueryResultType, which is ultimately used by the queryAnalysis() query field.

Table: QueryDiagnostic

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
Some input parameters may be required, as indicated in the Required column. For return values, this indicates that you are assured a value if the field is requested for the results. 
Table last updated: Oct 14, 2026 
codeStringyes Short-Term The code returned for the diagnostic. This is a preview for internal testing.
messageStringyes Short-Term The message for the query diagnostic. This is a preview for internal testing.
severitySeverityyes Short-Term The severity of the diagnostic. See Severity.