Submit feedback for a generated DQL result in Dynatrace with the NL2DQL API, including the message token, origin, feedback, and optional query details.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/davis/copilot/v1/skills/nl2dql:feedback |
Allows to provide feedback to a nl2dql response. The payload is a JSON dictionary combining feedback and information from the nl2dql response. Please review the examples for the correct payload formatting.
Parameters:
messageToken: Message token as provided by nl2dql:explain.
origin: Application name of the caller.
feedback: Feedback dictionary.
userQuery (Optional): Message prompt as sent to the nl2dql:generate endpoint.
*generatedDql (Optional): Response as received from the nl2dql:generate 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:nl2dql:execute scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | Nl2 | - | body | Required |
Nl2DqlFeedbackRequest object| Element | Type | Description | Required |
|---|---|---|---|
| messageToken | string | - | Required |
| origin | string | - | Required |
| feedback | Nl2 | - | Required |
| userQuery | string | - | Required |
| generatedDql | string | - | Optional |
Nl2DqlFeedback object| Element | Type | Description | Required |
|---|---|---|---|
| type | Nl2 | -The element can hold these values
| Required |
| text | string | - | Optional |
| category | Nl2 | Must be one of [ "misunderstood", "incorrect", "incomplete", "error", "other" ] | Optional |
| improvement | Nl2 | - | Optional |
Nl2DqlFeedbackType objectNl2DqlFeedbackCategory objectMust be one of [ "misunderstood", "incorrect", "incomplete", "error", "other" ]
Nl2DqlImprovedSummary 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": "Show me the latest 100 logs.","generatedDql": "fetch logs \n| limit 100 \n| sort timestamp desc"}
| 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"}}