Try it free

Get DQL processor autocomplete suggestions

  • Latest Dynatrace
  • Reference

Get autocomplete suggestions for a DQL processor script in Dynatrace OpenPipeline, using the script, cursor position, and protected fields you provide.

POSTSaaShttps://{your-environment-id}.apps.dynatrace.com/platform/openpipeline/v1/dqlProcessor/autocomplete

Overview

You send configurationId, cursorPosition, protectedFields, and script in the request body. Dynatrace returns autocomplete suggestions for the DQL processor script.

Authentication

To execute this request, you need a platform token or OAuth access token with openpipeline:configurations:read scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
bodyDQLProcessorAutocompleteRequest

DQL processor script and position to create suggestions for.

bodyRequired

Request body objects

The DQLProcessorAutocompleteRequest object

ElementTypeDescriptionRequired
configurationIdstring

Identifier of the configuration

Optional
cursorPositioninteger

The position of the cursor inside the script.

Optional
protectedFieldsstring[]

List of protected fields

Optional
scriptstring

The current (in-)complete DQL script.

Optional

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.

{
"cursorPosition": 5,
"script": "parse"
}

Response

Response codes

CodeTypeDescription
200AutocompleteResponse

Returns the autocomplete suggestions for the DQL processor script.

4XXErrorResponseEnvelope

Client-side error.

5XXErrorResponseEnvelope

Server-side error.

Response body objects

The AutocompleteResponse object

The response of the autocomplete call.

ElementTypeDescription
optionalboolean

True if the suggestions are optional.

suggestedTtlSecondsinteger

Suggested duration, in seconds, for how long the response can be cached and reused by the client. It's derived from the volatility of the suggestions on the server (such as if the suggestions are static, how long the server will cache the volatile suggestions, etc.). If no value is provided, the result might be cached for a long time. If the value is lower than 1, the result won't be cached.

suggestionsAutocompleteSuggestion[]

The list of suggestions.

The AutocompleteSuggestion object

Single suggestion for completion of the query.

ElementTypeDescription
alreadyTypedCharactersinteger

Number of characters that the user already typed for this suggestion.

partsAutocompleteSuggestionPart[]

List of suggestion parts.

suggestionstring

The suggested continuation of the input.

The AutocompleteSuggestionPart object

Part of the suggestion.

ElementTypeDescription
infostring

The type of the suggestion.

suggestionstring

The suggested continuation of the input.

synopsisstring

The synopsis of the suggestion.

typestring

The type of the autocomplete token.

The element can hold these values
  • ASSIGNMENT
  • BOOLEAN_FALSE
  • BOOLEAN_TRUE
  • BRACE_CLOSE
  • BRACE_OPEN
  • BRACKET_CLOSE
  • BRACKET_OPEN
  • COLON
  • COMMA
  • COMMAND_NAME
  • DATA_OBJECT
  • DOT
  • END_COMMENT
  • ENTITY_ATTRIBUTE
  • ENTITY_SELECTOR_PART
  • ENTITY_TYPE
  • FIELD_MODIFIER
  • FIELD_PATTERN
  • FUNCTION_NAME
  • INDENT
  • LINEBREAK
  • METRIC_KEY
  • NULL
  • NUMBER
  • OPERATOR
  • PARAMETER_KEY
  • PARAMETER_VALUE_SCOPE
  • PARENTHESIS_CLOSE
  • PARENTHESIS_OPEN
  • PARSE_PATTERN
  • PIPE
  • QUOTE
  • SIMPLE_IDENTIFIER
  • SINGLE_QUOTE
  • SLASH
  • SPACE
  • STRING
  • TIMESERIES_AGGREGATION
  • TIMESERIES_AGGREGATION_EXPRESSION
  • TIMESTAMP_VALUE
  • TIME_UNIT
  • TRAVERSAL_HOP_COUNT
  • TRAVERSAL_OPERATOR
  • TRAVERSAL_RELATION_NAME
  • UID_VALUE
  • VARIABLE

The ErrorResponseEnvelope object

Encloses the encountered error.

ElementTypeDescription
errorErrorResponse

Basic information of the encountered error.

The ErrorResponse object

Basic information of the encountered error.

ElementTypeDescription
codeinteger

The returned HTTP status code.

detailsErrorResponseDetails

Detailed information of the error.

messagestring

Description of the encountered error.

The ErrorResponseDetails object

Detailed information of the error.

ElementTypeDescription
typestring

Defines the actual set of fields depending on the value. See one of the following objects:

  • constraintViolation -> ConstraintViolationDetails
The element can hold these values
  • constraintViolation

Response body JSON models

{
"suggestions": [
{
"parts": [
{
"suggestion": " ",
"type": "SPACE"
}
],
"alreadyTypedCharacters": 0,
"suggestion": " "
},
{
"parts": [
{
"suggestion": "parse",
"type": "COMMAND_NAME",
"info": "Parses a record field and puts the result(s) into one or more fields as specified in the pattern.",
"synopsis": "parse expression, pattern [, preserveFieldsOnFailure] [, parsingPrerequisite]"
},
{
"suggestion": " ",
"type": "SPACE"
}
],
"alreadyTypedCharacters": 5,
"suggestion": "parse "
}
],
"optional": false
}
{
"error": {
"code": 400,
"message": "Bad request."
}
}
Related tags
Platform APIDynatrace Platform