Return autocomplete suggestions for a matcher in Dynatrace OpenPipeline API, using the query and cursor position to refine the matcher text.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/openpipeline/v1/matcher/autocomplete |
You send the query and cursorPosition in the request body to get autocompletion suggestions for the matcher. The response returns the autocomplete suggestions for the matcher.
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.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | Matcher | Matcher and position to create suggestions for. | body | Required |
MatcherAutocompleteRequest object| Element | Type | Description | Required |
|---|---|---|---|
| cursorPosition | integer | The position of the cursor inside the query. | Optional |
| query | string | The current (in-)complete matcher query. | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"query": "match","cursorPosition": 5}
| Code | Type | Description |
|---|---|---|
| 200 | Autocomplete | Returns the autocomplete suggestions for the matcher. |
| 4XX | Error | Client-side error. |
| 5XX | Error | Server-side error. |
AutocompleteResponse objectThe response of the autocomplete call.
| Element | Type | Description |
|---|---|---|
| optional | boolean | True if the suggestions are optional. |
| suggestedTtlSeconds | integer | 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 |
| suggestions | Autocomplete | The list of suggestions. |
AutocompleteSuggestion objectSingle suggestion for completion of the query.
| Element | Type | Description |
|---|---|---|
| alreadyTypedCharacters | integer | Number of characters that the user already typed for this suggestion. |
| parts | Autocomplete | List of suggestion parts. |
| suggestion | string | The suggested continuation of the input. |
AutocompleteSuggestionPart objectPart of the suggestion.
| Element | Type | Description |
|---|---|---|
| info | string | The type of the suggestion. |
| suggestion | string | The suggested continuation of the input. |
| synopsis | string | The synopsis of the suggestion. |
| type | string | The type of the autocomplete token. The element can hold these values
|
ErrorResponseEnvelope objectEncloses the encountered error.
| Element | Type | Description |
|---|---|---|
| error | Error | Basic information of the encountered error. |
ErrorResponse objectBasic information of the encountered error.
| Element | Type | Description |
|---|---|---|
| code | integer | The returned HTTP status code. |
| details | Error | Detailed information of the error. |
| message | string | Description of the encountered error. |
ErrorResponseDetails objectDetailed information of the error.
| Element | Type | Description |
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects:
The element can hold these values
|
{"suggestions": [{"parts": [{"suggestion": "","type": "SIMPLE_IDENTIFIER","info": "some custom field"}],"alreadyTypedCharacters": 0,"suggestion": ""},{"parts": [{"suggestion": "matchesPhrase","type": "FUNCTION_NAME","info": "Matches a phrase against the input string expression using token matchers.","synopsis": "matchesPhrase(expression, phrase [, caseSensitive])"},{"suggestion": "(","type": "PARENTHESIS_OPEN"}],"alreadyTypedCharacters": 5,"suggestion": "matchesPhrase("},{"parts": [{"suggestion": "matchesValue","type": "FUNCTION_NAME","info": "Matches a value against the input expression using token matchers.","synopsis": "matchesValue(expression, value [, caseSensitive])"},{"suggestion": "(","type": "PARENTHESIS_OPEN"}],"alreadyTypedCharacters": 5,"suggestion": "matchesValue("},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "*","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " * "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "/","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " / "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "%","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " % "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "+","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " + "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "-","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " - "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "==","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " == "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "!=","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " != "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "<","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " < "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": ">","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " > "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "<=","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " <= "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": ">=","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " >= "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "and","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " and "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "xor","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " xor "},{"parts": [{"suggestion": " ","type": "SPACE"},{"suggestion": "or","type": "OPERATOR"},{"suggestion": " ","type": "SPACE"}],"alreadyTypedCharacters": 0,"suggestion": " or "},{"parts": [{"suggestion": "|","type": "PIPE"}],"alreadyTypedCharacters": 0,"suggestion": "|"}],"optional": true}
{"error": {"code": 400,"message": "Bad request."}}