Try it free

Explain a DQL query

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026

Explain a valid DQL query in Dynatrace with the Davis CoPilot API, returning a natural language answer from the Dql2Nl skill.

POSTSaaShttps://{your-environment-id}.apps.dynatrace.com/platform/davis/copilot/v1/skills/dql2nl:explain

Overview

You send the dql field in the request body to explain a valid DQL query in natural language. The operation returns an answer from the Dql2Nl skill.

Authentication

To execute this request, you need a platform token or OAuth access token with davis-copilot:dql2nl:execute scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
bodyDql2NlRequest-bodyRequired

Request body objects

The Dql2NlRequest object

ElementTypeDescriptionRequired
dqlstring-Required

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

{
"dql": "fetch logs, from:now()-1h, samplingRatio:100\n| fields timestamp, severity, logfile, message, container\n| limit 10\n| filterOut severity == \"NONE\" or severity == \"INFO\"\n| sort timestamp desc"
}

Response

Response codes

CodeTypeDescription
200Dql2NlResponse

Answer from Dql2Nl skill

4XXClientErrorResponse-
5XXInternalErrorResponse-

Response body objects

The Dql2NlResponse object

ElementTypeDescription
summarystring-
explanationstring-
messageTokenstring-
statusStatus-
The element can hold these values
  • SUCCESSFUL
  • SUCCESSFUL_WITH_WARNINGS
  • FAILED
metadataMetadata-

The Status object

The Metadata object

ElementTypeDescription
notificationsNotification[]-

The Notification object

ElementTypeDescription
severitystring-
notificationTypestring-
messagestring-

The ClientErrorResponse object

ElementTypeDescription
errorClientErrorResponseObject-

The ClientErrorResponseObject object

ElementTypeDescription
codeinteger-
messagestring-

Response body JSON models

{
"summary": "Fetch logs data, group by 'loglevel', and count the number of logs for each log level.",
"explanation": "- The query fetches logs data.\n- It groups the logs by the 'loglevel' field.\n- It counts the number of logs for each log level.",
"messageToken": "1e9eaca7-2a32-4263-806f-787fa2e1350c",
"status": "SUCCESSFUL",
"metadata": {
"notifications": [
{
"severity": "WARNING",
"notificationType": "POSSIBLY_UNEXPECTED_DQL_BEHAVIOUR",
"message": "Your prompt seems to refer to segments or management zones. Please select the segment using the segment selector."
}
]
}
}
{
"error": {
"code": 400,
"message": "Bad Request"
}
}
Related tags
Platform APIDynatrace PlatformAI Observability