Submit feedback for a DQL explanation in Dynatrace with the DQL2NL API, including the message token, origin, feedback, and optional response details.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/davis/copilot/v1/skills/dql2nl:feedback |
Allows to provide feedback to a dql2nl response. The payload is a JSON dictionary combining feedback and information from the dql2nl response. Please review the examples for the correct payload formatting.
Parameters:
messageToken: Message token as provided by dql2nl:explain.
origin: Application name of the caller.
feedback: Feedback dictionary.
userQuery (Optional): Message prompt as sent to the dql2nl:explain endpoint.
*queryExplanation (Optional): Response as received from the dql2nl:explain endpoint.
Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.
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.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | Dql2 | - | body | Required |
Dql2NlFeedbackRequest object| Element | Type | Description | Required |
|---|---|---|---|
| messageToken | string | - | Required |
| origin | string | - | Required |
| feedback | Dql2 | - | Required |
| userQuery | string | - | Required |
| queryExplanation | string | - | Optional |
Dql2NlFeedback object| Element | Type | Description | Required |
|---|---|---|---|
| type | Dql2 | -The element can hold these values
| Required |
| text | string | - | Optional |
| category | Dql2 | Must be one of [ "misunderstood", "incorrect", "incomplete", "error", "other" ] | Optional |
| improvement | Dql2 | - | Optional |
Dql2NlFeedbackType objectDql2NlFeedbackCategory objectMust be one of [ "misunderstood", "incorrect", "incomplete", "error", "other" ]
Dql2NlImprovedSummary object| Element | Type | Description | Required |
|---|---|---|---|
| text | string | - | Required |
| confirmation | boolean | - | Required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"messageToken": "string","origin": "Notebooks DQL to NL feedback","feedback": {"type": "positive","text": "The DQL statement was not correct.","category": "misunderstood","improvement": {"text": "The DQL statement should have shown me metadata for the logs source.","confirmation": true}},"userQuery": "describe logs","queryExplanation": "Show me the metadata of the logs data source."}
| Code | Type | Description |
|---|---|---|
| 202 | - | Feedback successfully submitted |
| 4XX | Client | - |
| 5XX | Internal | - |
ClientErrorResponse object| Element | Type | Description |
|---|---|---|
| error | Client | - |
ClientErrorResponseObject object| Element | Type | Description |
|---|---|---|
| code | integer | - |
| message | string | - |
{"error": {"code": 400,"message": "Bad Request"}}