@dynatrace-sdk/client-query 1.15.0 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +111 -168
  3. package/cjs/index.js +581 -3316
  4. package/dynatrace-metadata.json +2 -2
  5. package/esm/index.js +557 -3292
  6. package/package.json +2 -2
  7. package/types/packages/client/query/src/lib/apis/query-assistance-api.d.ts +6 -9
  8. package/types/packages/client/query/src/lib/apis/query-execution-api.d.ts +6 -13
  9. package/types/packages/client/query/src/lib/error-envelopes/index.d.ts +3 -3
  10. package/types/packages/client/query/src/lib/models/autocomplete-request.d.ts +3 -0
  11. package/types/packages/client/query/src/lib/models/autocomplete-suggestion-part.d.ts +4 -2
  12. package/types/packages/client/query/src/lib/models/dql-container-node.d.ts +1 -1
  13. package/types/packages/client/query/src/lib/models/dql-node-node-type.d.ts +2 -0
  14. package/types/packages/client/query/src/lib/models/dql-node.d.ts +7 -2
  15. package/types/packages/client/query/src/lib/models/dql-terminal-node.d.ts +4 -2
  16. package/types/packages/client/query/src/lib/models/error-envelope.d.ts +3 -0
  17. package/types/packages/client/query/src/lib/models/error-response-details.d.ts +3 -0
  18. package/types/packages/client/query/src/lib/models/error-response.d.ts +3 -0
  19. package/types/packages/client/query/src/lib/models/execute-request.d.ts +6 -0
  20. package/types/packages/client/query/src/lib/models/field-type-type.d.ts +3 -0
  21. package/types/packages/client/query/src/lib/models/field-type.d.ts +1 -2
  22. package/types/packages/client/query/src/lib/models/grail-metadata.d.ts +3 -0
  23. package/types/packages/client/query/src/lib/models/index.d.ts +0 -40
  24. package/types/packages/client/query/src/lib/models/metadata-notification.d.ts +3 -0
  25. package/types/packages/client/query/src/lib/models/metadata.d.ts +3 -0
  26. package/types/packages/client/query/src/lib/models/parse-request.d.ts +3 -0
  27. package/types/packages/client/query/src/lib/models/query-poll-response.d.ts +7 -2
  28. package/types/packages/client/query/src/lib/models/query-result.d.ts +3 -0
  29. package/types/packages/client/query/src/lib/models/query-start-response.d.ts +7 -2
  30. package/types/packages/client/query/src/lib/models/query-state.d.ts +2 -0
  31. package/types/packages/client/query/src/lib/models/ranged-field-types.d.ts +3 -0
  32. package/types/packages/client/query/src/lib/models/token-position.d.ts +6 -0
  33. package/types/packages/client/query/src/lib/models/token-type.d.ts +2 -0
  34. package/types/packages/client/query/src/lib/models/verify-request.d.ts +3 -0
  35. package/types/packages/client/query/src/lib/utils/encoding.d.ts +10 -0
  36. package/types/packages/client/query/src/lib/utils/transformations.d.ts +6 -0
  37. package/types/packages/http-client/src/lib/types/binary.d.ts +2 -2
  38. package/types/packages/http-client/src/lib/types/http-client-response.d.ts +2 -2
  39. package/types/packages/shared-errors/src/api-client-error.d.ts +13 -1
  40. package/types/packages/shared-errors/src/api-gateway-error.d.ts +19 -0
  41. package/types/packages/shared-errors/src/client-request-error.d.ts +29 -0
  42. package/types/packages/shared-errors/src/index.d.ts +0 -1
  43. package/types/packages/shared-errors/src/invalid-response-error.d.ts +18 -1
  44. package/types/packages/shared-errors/src/types.d.ts +62 -5
  45. package/types/packages/client/query/src/lib/error-envelopes/error-serializer.d.ts +0 -3
  46. package/types/packages/client/query/src/lib/models/autocomplete-request.transformation.d.ts +0 -14
  47. package/types/packages/client/query/src/lib/models/autocomplete-response.transformation.d.ts +0 -11
  48. package/types/packages/client/query/src/lib/models/autocomplete-suggestion-part.transformation.d.ts +0 -12
  49. package/types/packages/client/query/src/lib/models/autocomplete-suggestion.transformation.d.ts +0 -11
  50. package/types/packages/client/query/src/lib/models/dql-alternative-node.transformation.d.ts +0 -9
  51. package/types/packages/client/query/src/lib/models/dql-container-node.transformation.d.ts +0 -10
  52. package/types/packages/client/query/src/lib/models/dql-node-node-type.transformation.d.ts +0 -6
  53. package/types/packages/client/query/src/lib/models/dql-node.transformation.d.ts +0 -17
  54. package/types/packages/client/query/src/lib/models/dql-terminal-node.transformation.d.ts +0 -12
  55. package/types/packages/client/query/src/lib/models/error-envelope.transformation.d.ts +0 -12
  56. package/types/packages/client/query/src/lib/models/error-response-details-constraint-violations-item.transformation.d.ts +0 -10
  57. package/types/packages/client/query/src/lib/models/error-response-details.transformation.d.ts +0 -21
  58. package/types/packages/client/query/src/lib/models/error-response.transformation.d.ts +0 -11
  59. package/types/packages/client/query/src/lib/models/execute-request.transformation.d.ts +0 -23
  60. package/types/packages/client/query/src/lib/models/field-type-type.transformation.d.ts +0 -6
  61. package/types/packages/client/query/src/lib/models/field-type.transformation.d.ts +0 -11
  62. package/types/packages/client/query/src/lib/models/filter-segment-variable-definition.transformation.d.ts +0 -9
  63. package/types/packages/client/query/src/lib/models/filter-segment.transformation.d.ts +0 -10
  64. package/types/packages/client/query/src/lib/models/filter-segments.transformation.d.ts +0 -6
  65. package/types/packages/client/query/src/lib/models/geo-point.transformation.d.ts +0 -9
  66. package/types/packages/client/query/src/lib/models/grail-metadata.transformation.d.ts +0 -22
  67. package/types/packages/client/query/src/lib/models/metadata-notification.transformation.d.ts +0 -15
  68. package/types/packages/client/query/src/lib/models/metadata.transformation.d.ts +0 -11
  69. package/types/packages/client/query/src/lib/models/metric-metadata.transformation.d.ts +0 -15
  70. package/types/packages/client/query/src/lib/models/parse-request.transformation.d.ts +0 -12
  71. package/types/packages/client/query/src/lib/models/position-info.transformation.d.ts +0 -10
  72. package/types/packages/client/query/src/lib/models/query-options.transformation.d.ts +0 -8
  73. package/types/packages/client/query/src/lib/models/query-poll-response.transformation.d.ts +0 -13
  74. package/types/packages/client/query/src/lib/models/query-result.transformation.d.ts +0 -13
  75. package/types/packages/client/query/src/lib/models/query-start-response.transformation.d.ts +0 -14
  76. package/types/packages/client/query/src/lib/models/query-state.transformation.d.ts +0 -6
  77. package/types/packages/client/query/src/lib/models/ranged-field-types-mappings.transformation.d.ts +0 -9
  78. package/types/packages/client/query/src/lib/models/ranged-field-types.transformation.d.ts +0 -10
  79. package/types/packages/client/query/src/lib/models/result-record-value.transformation.d.ts +0 -26
  80. package/types/packages/client/query/src/lib/models/result-record.transformation.d.ts +0 -9
  81. package/types/packages/client/query/src/lib/models/timeframe.transformation.d.ts +0 -9
  82. package/types/packages/client/query/src/lib/models/token-position.transformation.d.ts +0 -13
  83. package/types/packages/client/query/src/lib/models/token-type.transformation.d.ts +0 -6
  84. package/types/packages/client/query/src/lib/models/verify-request.transformation.d.ts +0 -13
  85. package/types/packages/client/query/src/lib/models/verify-response.transformation.d.ts +0 -11
  86. package/types/packages/shared-errors/src/sdk-error.d.ts +0 -5
package/CHANGELOG.md CHANGED
@@ -2,9 +2,36 @@
2
2
 
3
3
  @dynatrace-sdk/client-query
4
4
 
5
+ ## 1.17.1
6
+
7
+ ### Patch Changes
8
+
9
+ - Replace model transformations with single transformation function. (APPDEV-10818)
10
+ - Redundant error serializers are removed. (APPDEV-10272)
11
+ - Missing await added for API Gateway handler and line breaks at the end of the string are ignored. APPDEV-10883
12
+ - Imports reformatted and fixed incorrect type rendered for arrays of enum values. APPDEV-10701
13
+
14
+ ## 1.17.0
15
+
16
+ ### Minor Changes
17
+
18
+ - Enums are replaced with unions of literals. APPDEV-10338
19
+ - Inline enums as union of literals. APPDEV-9924
20
+
21
+ ### Patch Changes
22
+
23
+ - Add return types and improve usage examples inside JSDoc. APPDEV-7536
24
+
25
+ ## 1.16.0
26
+
27
+ ### Features
28
+
29
+ - Export errors from the package.
30
+
5
31
  ## 1.15.0
6
32
 
7
33
  ### Minor Changes
34
+
8
35
  - Add new token type to the `TokenType` enum and new field type to the `FieldType` enum.
9
36
 
10
37
  ## 1.14.0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @dynatrace-sdk/client-query
2
2
 
3
- [![npm](https://img.shields.io/badge/npm-v1.15.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.15.0)
3
+ [![npm](https://img.shields.io/badge/npm-v1.17.1-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.17.1)
4
4
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5
5
 
6
6
  Exposes an API to fetch records stored in Grail
@@ -97,7 +97,16 @@ a link to docs, etc.
97
97
 
98
98
  #### Returns
99
99
 
100
- A list of structured autocomplete suggestions.
100
+ | Return type | Description |
101
+ |---|---|
102
+ |Promise<AutocompleteResponse>|A list of structured autocomplete suggestions.|
103
+
104
+
105
+ #### Throws
106
+
107
+ | Error Type | Error Message |
108
+ |---|---|
109
+ |ErrorEnvelopeError|The supplied request is wrong. Either the query itself or other parameters are wrong. \| An internal server error has occurred.|
101
110
 
102
111
 
103
112
  <details>
@@ -341,7 +350,16 @@ When displaying the query, pick one option. You may use the other options for ho
341
350
 
342
351
  #### Returns
343
352
 
344
- A node containing more nodes, a node offering different (semantically equivalent) versions of the query parts, or a terminal node that shows the canonical form.
353
+ | Return type | Description |
354
+ |---|---|
355
+ |Promise&lt;DQLNode&gt;|A node containing more nodes, a node offering different (semantically equivalent) versions of the query parts, or a terminal node that shows the canonical form.|
356
+
357
+
358
+ #### Throws
359
+
360
+ | Error Type | Error Message |
361
+ |---|---|
362
+ |ErrorEnvelopeError|The supplied request is wrong. Either the query itself or other parameters are wrong. \| An internal server error has occurred.|
345
363
 
346
364
 
347
365
  <details>
@@ -400,7 +418,16 @@ submitting the query for execution.
400
418
 
401
419
  #### Returns
402
420
 
403
- Supplied query and parameters were verified.
421
+ | Return type | Description |
422
+ |---|---|
423
+ |Promise&lt;VerifyResponse&gt;|Supplied query and parameters were verified.|
424
+
425
+
426
+ #### Throws
427
+
428
+ | Error Type | Error Message |
429
+ |---|---|
430
+ |ErrorEnvelopeError|The supplied request is wrong. \| An internal server error has occurred.|
404
431
 
405
432
 
406
433
  <details>
@@ -494,7 +521,16 @@ It is guaranteed that every field of every record will have a corresponding type
494
521
 
495
522
  #### Returns
496
523
 
497
- The query already finished.
524
+ | Return type | Description |
525
+ |---|---|
526
+ |Promise&lt;QueryPollResponse | void&gt;|The query already finished.|
527
+
528
+
529
+ #### Throws
530
+
531
+ | Error Type | Error Message |
532
+ |---|---|
533
+ |ErrorEnvelopeError|The supplied request is wrong. Either the query itself or other parameters are wrong. \| An internal server error has occurred.|
498
534
 
499
535
 
500
536
  <details>
@@ -580,7 +616,17 @@ It is guaranteed that every field of every record will have a corresponding type
580
616
 
581
617
  #### Returns
582
618
 
583
- The final status and results of the supplied query if it finished within a supplied requestTimeoutMilliseconds. | The status of the query to start.
619
+ | Return type | Description |
620
+ |---|---|
621
+ |Promise&lt;QueryStartResponse&gt;|The final status and results of the supplied query if it finished within a supplied requestTimeoutMilliseconds. \| The status of the query to start.|
622
+
623
+
624
+ #### Throws
625
+
626
+ | Error Type | Error Message |
627
+ |---|---|
628
+ |ErrorEnvelopeError|The supplied request is wrong. Either the query itself or other parameters are wrong. \| Too many requests. \| An internal server error has occurred. \| Service is unavailable. \| Client error. \| Server error.|
629
+ |InsufficientPermission|Insufficient permissions.|
584
630
 
585
631
 
586
632
  <details>
@@ -667,7 +713,16 @@ It is guaranteed that every field of every record will have a corresponding type
667
713
 
668
714
  #### Returns
669
715
 
670
- The current status and results of the supplied query.
716
+ | Return type | Description |
717
+ |---|---|
718
+ |Promise&lt;QueryPollResponse&gt;|The current status and results of the supplied query.|
719
+
720
+
721
+ #### Throws
722
+
723
+ | Error Type | Error Message |
724
+ |---|---|
725
+ |ErrorEnvelopeError|The supplied request is wrong. Either the query itself or other parameters are wrong. \| An internal server error has occurred.|
671
726
 
672
727
 
673
728
  <details>
@@ -693,25 +748,17 @@ const data = await queryExecutionClient.queryPoll({
693
748
 
694
749
  ### AutocompleteRequest
695
750
 
696
-
697
-
698
-
699
-
700
-
701
751
  | Name | Type | Description |
702
752
  | --- | --- | --- |
703
753
  |cursorPosition|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
704
754
  |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query locale. If none specified, then a language/country neutral locale is chosen. The input values take the ISO-639 Language code with an optional ISO-3166 country code appended to it with an underscore. For instance, both values are valid 'en' or 'en_US'. |
705
755
  |maxDataSuggestions|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
706
756
  |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
707
- |queryOptions|<a href="#queryoptions">QueryOptions</a>| |
757
+ |queryOptions|<a href="#queryoptions">QueryOptions</a>|Query options enhance query functionality for Dynatrace internal services. |
708
758
  |timezone|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query timezone. If none is specified, UTC is used as fallback. The list of valid input values matches that of the IANA Time Zone Database (TZDB). It accepts values in their canonical names like 'Europe/Paris', the abbreviated version like CET or the UTC offset format like '+01:00' |
709
759
 
710
760
  ### AutocompleteResponse
711
761
 
712
-
713
-
714
-
715
762
  The response of the autocomplete call.
716
763
 
717
764
  | Name | Type | Description |
@@ -722,9 +769,6 @@ The response of the autocomplete call.
722
769
 
723
770
  ### AutocompleteSuggestion
724
771
 
725
-
726
-
727
-
728
772
  Single suggestion for completion of the query.
729
773
 
730
774
  | Name | Type | Description |
@@ -735,9 +779,6 @@ Single suggestion for completion of the query.
735
779
 
736
780
  ### AutocompleteSuggestionPart
737
781
 
738
-
739
-
740
-
741
782
  Part of the suggestion.
742
783
 
743
784
  | Name | Type | Description |
@@ -745,55 +786,43 @@ Part of the suggestion.
745
786
  |info|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The type of the suggestion. |
746
787
  |suggestion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The suggested continuation of the query. |
747
788
  |synopsis|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The synopsis of the suggestion. |
748
- |type<sup>*required</sup>|TokenType| |
789
+ |type<sup>*required</sup>|"SPACE" &#124; "LINEBREAK" &#124; "INDENT" &#124; "PIPE" &#124; "DOT" &#124; "COLON" &#124; "COMMA" &#124; "ASSIGNMENT" &#124; "BRACE_OPEN" &#124; "BRACE_CLOSE" &#124; "BRACKET_OPEN" &#124; "BRACKET_CLOSE" &#124; "PARENTHESIS_OPEN" &#124; "PARENTHESIS_CLOSE" &#124; "QUOTE" &#124; "SINGLE_QUOTE" &#124; "SLASH" &#124; "BOOLEAN_TRUE" &#124; "BOOLEAN_FALSE" &#124; "NULL" &#124; "COMMAND_NAME" &#124; "PARAMETER_KEY" &#124; "PARAMETER_VALUE_SCOPE" &#124; "FUNCTION_NAME" &#124; "TIMESERIES_AGGREGATION" &#124; "TIMESERIES_AGGREGATION_EXPRESSION" &#124; "OPERATOR" &#124; "TRAVERSAL_OPERATOR" &#124; "TRAVERSAL_RELATION_NAME" &#124; "TRAVERSAL_HOP_COUNT" &#124; "SIMPLE_IDENTIFIER" &#124; "DATA_OBJECT" &#124; "NUMBER" &#124; "STRING" &#124; "TIME_UNIT" &#124; "TIMESTAMP_VALUE" &#124; "METRIC_KEY" &#124; "VARIABLE" &#124; "END_COMMENT" &#124; "UID_VALUE" &#124; "PARSE_PATTERN" &#124; "FIELD_PATTERN" &#124; "ENTITY_SELECTOR_PART" &#124; "FIELD_MODIFIER" &#124; "ENTITY_TYPE" &#124; "ENTITY_ATTRIBUTE" &#124; "SMARTSCAPE_ID_VALUE"|The type of the autocomplete token. |
749
790
 
750
791
  ### DQLAlternativeNode
751
792
 
752
-
753
-
754
-
755
793
  The DQL node that has alternatives.
756
794
 
757
795
  | Name | Type | Description |
758
796
  | --- | --- | --- |
759
797
  |alternatives|object|The different alternatives. |
760
798
  |isOptional<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the node is optional. |
761
- |nodeType<sup>*required</sup>|DQLNodeNodeType| |
762
- |tokenPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>| |
799
+ |nodeType<sup>*required</sup>|"TERMINAL" &#124; "CONTAINER" &#124; "ALTERNATIVE"|The type of the node. |
800
+ |tokenPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>|The position of a token in a query string used for errors and notification to map the message to a specific part of the query. |
763
801
 
764
802
  ### DQLContainerNode
765
803
 
766
-
767
-
768
-
769
804
  The DQL node that contains other nodes.
770
805
 
771
806
  | Name | Type | Description |
772
807
  | --- | --- | --- |
773
808
  |children|Array&lt;<a href="#dqlnode">DQLNode</a>&gt;|The list of children nodes. |
774
809
  |isOptional<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the node is optional. |
775
- |nodeType<sup>*required</sup>|DQLNodeNodeType| |
776
- |tokenPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>| |
777
- |type|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The type of the node. |
810
+ |nodeType<sup>*required</sup>|"TERMINAL" &#124; "CONTAINER" &#124; "ALTERNATIVE"|The type of the node. |
811
+ |tokenPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>|The position of a token in a query string used for errors and notification to map the message to a specific part of the query. |
812
+ |type|"QUERY" &#124; "EXECUTION_BLOCK" &#124; "COMMAND" &#124; "COMMAND_SEPARATOR" &#124; "PARAMETER_WITH_KEY" &#124; "GROUP" &#124; "PARAMETERS" &#124; "PARAMETER_NAMING" &#124; "PARAMETER_ASSIGNMENT" &#124; "PARAMETER_SEPARATOR" &#124; "FUNCTION" &#124; "FUNCTION_PART" &#124; "EXPRESSION" &#124; "IDENTIFIER" &#124; "SOURCE_ID" &#124; "DURATION" &#124; "TIMESTAMP" &#124; "TIMEFRAME" &#124; "TRAVERSAL_PATH" &#124; "TRAVERSAL_STEP"|The type of the node. |
778
813
 
779
814
  ### DQLNode
780
815
 
781
-
782
-
783
-
784
816
  General Node in the DQL query.
785
817
 
786
818
  | Name | Type | Description |
787
819
  | --- | --- | --- |
788
820
  |isOptional<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the node is optional. |
789
- |nodeType<sup>*required</sup>|DQLNodeNodeType| |
790
- |tokenPosition|<a href="#tokenposition">TokenPosition</a>| |
821
+ |nodeType<sup>*required</sup>|"TERMINAL" &#124; "CONTAINER" &#124; "ALTERNATIVE"|The type of the node. |
822
+ |tokenPosition|<a href="#tokenposition">TokenPosition</a>|The position of a token in a query string used for errors and notification to map the message to a specific part of the query. |
791
823
 
792
824
  ### DQLTerminalNode
793
825
 
794
-
795
-
796
-
797
826
  Node that represents single token.
798
827
 
799
828
  | Name | Type | Description |
@@ -801,39 +830,30 @@ Node that represents single token.
801
830
  |canonicalString|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Canonical form. |
802
831
  |isMandatoryOnUserOrder|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|For optional items only: whether this node becomes mandatory when user order is used. True only for some optional 'ghost braces' |
803
832
  |isOptional<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the node is optional. |
804
- |nodeType<sup>*required</sup>|DQLNodeNodeType| |
805
- |tokenPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>| |
806
- |type|TokenType| |
833
+ |nodeType<sup>*required</sup>|"TERMINAL" &#124; "CONTAINER" &#124; "ALTERNATIVE"|The type of the node. |
834
+ |tokenPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>|The position of a token in a query string used for errors and notification to map the message to a specific part of the query. |
835
+ |type|"SPACE" &#124; "LINEBREAK" &#124; "INDENT" &#124; "PIPE" &#124; "DOT" &#124; "COLON" &#124; "COMMA" &#124; "ASSIGNMENT" &#124; "BRACE_OPEN" &#124; "BRACE_CLOSE" &#124; "BRACKET_OPEN" &#124; "BRACKET_CLOSE" &#124; "PARENTHESIS_OPEN" &#124; "PARENTHESIS_CLOSE" &#124; "QUOTE" &#124; "SINGLE_QUOTE" &#124; "SLASH" &#124; "BOOLEAN_TRUE" &#124; "BOOLEAN_FALSE" &#124; "NULL" &#124; "COMMAND_NAME" &#124; "PARAMETER_KEY" &#124; "PARAMETER_VALUE_SCOPE" &#124; "FUNCTION_NAME" &#124; "TIMESERIES_AGGREGATION" &#124; "TIMESERIES_AGGREGATION_EXPRESSION" &#124; "OPERATOR" &#124; "TRAVERSAL_OPERATOR" &#124; "TRAVERSAL_RELATION_NAME" &#124; "TRAVERSAL_HOP_COUNT" &#124; "SIMPLE_IDENTIFIER" &#124; "DATA_OBJECT" &#124; "NUMBER" &#124; "STRING" &#124; "TIME_UNIT" &#124; "TIMESTAMP_VALUE" &#124; "METRIC_KEY" &#124; "VARIABLE" &#124; "END_COMMENT" &#124; "UID_VALUE" &#124; "PARSE_PATTERN" &#124; "FIELD_PATTERN" &#124; "ENTITY_SELECTOR_PART" &#124; "FIELD_MODIFIER" &#124; "ENTITY_TYPE" &#124; "ENTITY_ATTRIBUTE" &#124; "SMARTSCAPE_ID_VALUE"|The type of the autocomplete token. |
807
836
 
808
837
  ### ErrorEnvelope
809
838
 
810
-
811
-
812
-
813
839
  An &apos;envelope&apos; error object that has the mandatory error object.
814
840
 
815
- | Name | Type |
816
- | --- | --- |
817
- |error<sup>*required</sup>|<a href="#errorresponse">ErrorResponse</a>|
841
+ | Name | Type | Description |
842
+ | --- | --- | --- |
843
+ |error<sup>*required</sup>|<a href="#errorresponse">ErrorResponse</a>|The response for error state |
818
844
 
819
845
  ### ErrorResponse
820
846
 
821
-
822
-
823
-
824
847
  The response for error state
825
848
 
826
849
  | Name | Type | Description |
827
850
  | --- | --- | --- |
828
851
  |code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Error code, which normally matches the HTTP error code. |
829
- |details|<a href="#errorresponsedetails" target="_blank" rel="noopener noreferrer">ErrorResponseDetails</a>| |
852
+ |details|<a href="#errorresponsedetails" target="_blank" rel="noopener noreferrer">ErrorResponseDetails</a>|Detailed information about the error. |
830
853
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A short, clear error message without details |
831
854
 
832
855
  ### ErrorResponseDetails
833
856
 
834
-
835
-
836
-
837
857
  Detailed information about the error.
838
858
 
839
859
  | Name | Type | Description |
@@ -849,15 +869,10 @@ Detailed information about the error.
849
869
  |missingScopes|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|List of missing IAM scopes necessary to successfully execute the request. |
850
870
  |queryId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
851
871
  |queryString|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Submitted query string. |
852
- |syntaxErrorPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>| |
872
+ |syntaxErrorPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>|The position of a token in a query string used for errors and notification to map the message to a specific part of the query. |
853
873
 
854
874
  ### ErrorResponseDetailsConstraintViolationsItem
855
875
 
856
-
857
-
858
-
859
-
860
-
861
876
  | Name | Type | Description |
862
877
  | --- | --- | --- |
863
878
  |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Message describing the error. |
@@ -866,11 +881,6 @@ Detailed information about the error.
866
881
 
867
882
  ### ExecuteRequest
868
883
 
869
-
870
-
871
-
872
-
873
-
874
884
  | Name | Type | Description |
875
885
  | --- | --- | --- |
876
886
  |defaultSamplingRatio|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|In case not specified in the DQL string, the sampling ratio defined here is applied. Note that this is only applicable to log queries. |
@@ -879,32 +889,26 @@ Detailed information about the error.
879
889
  |defaultTimeframeStart|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query timeframe 'start' timestamp in ISO-8601 or RFC3339 format. If the timeframe 'end' parameter is missing, the whole timeframe is ignored. <em>Note that if a timeframe is specified within the query string (query) then it has precedence over this query request parameter.</em> |
880
890
  |enablePreview|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Request preview results. If a preview is available within the requestTimeoutMilliseconds, then it will be returned as part of the response. |
881
891
  |fetchTimeoutSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The query will stop reading data after reaching the fetch-timeout. The query execution will continue, providing a partial result based on the read data. |
882
- |filterSegments|<a href="#filtersegments">FilterSegments</a>| |
892
+ |filterSegments|<a href="#filtersegments">FilterSegments</a>|Represents a collection of filter segments. |
883
893
  |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query locale. If none specified, then a language/country neutral locale is chosen. The input values take the ISO-639 Language code with an optional ISO-3166 country code appended to it with an underscore. For instance, both values are valid 'en' or 'en_US'. |
884
894
  |maxResultBytes|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The maximum number of result bytes that this query will return. |
885
895
  |maxResultRecords|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The maximum number of result records that this query will return. |
886
896
  |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
887
- |queryOptions|<a href="#queryoptions" target="_blank" rel="noopener noreferrer">QueryOptions</a>| |
897
+ |queryOptions|<a href="#queryoptions" target="_blank" rel="noopener noreferrer">QueryOptions</a>|Query options enhance query functionality for Dynatrace internal services. |
888
898
  |requestTimeoutMilliseconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The time a client is willing to wait for the query result. In case the query finishes within the specified timeout, the query result is returned. Otherwise, the requestToken is returned, allowing polling for the result. |
889
899
  |timezone|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query timezone. If none is specified, UTC is used as fallback. The list of valid input values matches that of the IANA Time Zone Database (TZDB). It accepts values in their canonical names like 'Europe/Paris', the abbreviated version like CET or the UTC offset format like '+01:00' |
890
900
 
891
901
  ### FieldType
892
902
 
893
-
894
-
895
-
896
903
  The possible type of a field in DQL.
897
904
 
898
905
  | Name | Type |
899
906
  | --- | --- |
900
- |type<sup>*required</sup>|FieldTypeType|
907
+ |type<sup>*required</sup>|"string" &#124; "boolean" &#124; "undefined" &#124; "binary" &#124; "double" &#124; "long" &#124; "timestamp" &#124; "timeframe" &#124; "duration" &#124; "ip_address" &#124; "geo_point" &#124; "array" &#124; "record" &#124; "uid" &#124; "smartscape_id"|
901
908
  |types|Array&lt;<a href="#rangedfieldtypes">RangedFieldTypes</a>&gt;|
902
909
 
903
910
  ### FilterSegment
904
911
 
905
-
906
-
907
-
908
912
  A filter segment is identified by an ID. Each segment includes a list of variable definitions.
909
913
 
910
914
  | Name | Type |
@@ -914,9 +918,6 @@ A filter segment is identified by an ID. Each segment includes a list of variabl
914
918
 
915
919
  ### FilterSegmentVariableDefinition
916
920
 
917
-
918
-
919
-
920
921
  Defines a variable with a name and a list of values.
921
922
 
922
923
  | Name | Type |
@@ -926,21 +927,12 @@ Defines a variable with a name and a list of values.
926
927
 
927
928
  ### FilterSegments
928
929
 
929
-
930
- extends `Array<FilterSegment>`
931
-
932
930
  Represents a collection of filter segments.
933
931
 
934
- | Name | Type | Description |
935
- | --- | --- | --- |
936
- |[unscopables]<sup>*required</sup>|Object|<p>Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.</p> |
937
- |length<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Gets or sets the length of the array. This is a number one higher than the highest index in the array. |
932
+ **type**: Array&lt;<a href="#filtersegment">FilterSegment</a>&gt;
938
933
 
939
934
  ### GeoPoint
940
935
 
941
-
942
-
943
-
944
936
  DQL data type representing a geolocation point.
945
937
 
946
938
  | Name | Type | Description |
@@ -950,19 +942,16 @@ DQL data type representing a geolocation point.
950
942
 
951
943
  ### GrailMetadata
952
944
 
953
-
954
-
955
-
956
945
  Collects various bits of metadata information.
957
946
 
958
947
  | Name | Type | Description |
959
948
  | --- | --- | --- |
960
- |analysisTimeframe|<a href="#timeframe">Timeframe</a>| |
949
+ |analysisTimeframe|<a href="#timeframe" target="_blank" rel="noopener noreferrer">Timeframe</a>|DQL data type timeframe. |
961
950
  |canonicalQuery|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The canonical form of the query. It has normalized spaces and canonical constructs. |
962
951
  |dqlVersion|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The version of DQL that was used to process the query request. |
963
952
  |executionTimeMilliseconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The time it took to execute the query. |
964
953
  |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Effective locale for the query. |
965
- |notifications|Array&lt;<a href="#metadatanotification" target="_blank" rel="noopener noreferrer">MetadataNotification</a>&gt;|Collected messages during the execution of the query. |
954
+ |notifications|Array&lt;<a href="#metadatanotification">MetadataNotification</a>&gt;|Collected messages during the execution of the query. |
966
955
  |query|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The submitted query. |
967
956
  |queryId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The id of the query |
968
957
  |sampled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if sampling was used for at least one segment. |
@@ -973,21 +962,15 @@ Collects various bits of metadata information.
973
962
 
974
963
  ### Metadata
975
964
 
976
-
977
-
978
-
979
965
  Collects various bits of metadata information.
980
966
 
981
- | Name | Type |
982
- | --- | --- |
983
- |grail|<a href="#grailmetadata">GrailMetadata</a>|
984
- |metrics|Array&lt;<a href="#metricmetadata" target="_blank" rel="noopener noreferrer">MetricMetadata</a>&gt;|
967
+ | Name | Type | Description |
968
+ | --- | --- | --- |
969
+ |grail|<a href="#grailmetadata" target="_blank" rel="noopener noreferrer">GrailMetadata</a>|Collects various bits of metadata information. |
970
+ |metrics|Array&lt;<a href="#metricmetadata">MetricMetadata</a>&gt;| |
985
971
 
986
972
  ### MetadataNotification
987
973
 
988
-
989
-
990
-
991
974
  The message that provides additional information about the execution of the query.
992
975
 
993
976
  | Name | Type | Description |
@@ -998,13 +981,10 @@ The message that provides additional information about the execution of the quer
998
981
  |messageFormatSpecifierTypes|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The corresponding DQL format specifier types for each format specifier used in the error message format. |
999
982
  |notificationType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The notification type, e.g. LIMIT_ADDED. |
1000
983
  |severity|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The severity of the notification, currently: INFO, WARN, ERROR. |
1001
- |syntaxPosition|<a href="#tokenposition">TokenPosition</a>| |
984
+ |syntaxPosition|<a href="#tokenposition" target="_blank" rel="noopener noreferrer">TokenPosition</a>|The position of a token in a query string used for errors and notification to map the message to a specific part of the query. |
1002
985
 
1003
986
  ### MetricMetadata
1004
987
 
1005
-
1006
-
1007
-
1008
988
  An object that defines additional metric metadata.
1009
989
 
1010
990
  | Name | Type | Description |
@@ -1020,23 +1000,15 @@ An object that defines additional metric metadata.
1020
1000
 
1021
1001
  ### ParseRequest
1022
1002
 
1023
-
1024
-
1025
-
1026
-
1027
-
1028
1003
  | Name | Type | Description |
1029
1004
  | --- | --- | --- |
1030
1005
  |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query locale. If none specified, then a language/country neutral locale is chosen. The input values take the ISO-639 Language code with an optional ISO-3166 country code appended to it with an underscore. For instance, both values are valid 'en' or 'en_US'. |
1031
1006
  |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
1032
- |queryOptions|<a href="#queryoptions" target="_blank" rel="noopener noreferrer">QueryOptions</a>| |
1007
+ |queryOptions|<a href="#queryoptions">QueryOptions</a>|Query options enhance query functionality for Dynatrace internal services. |
1033
1008
  |timezone|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query timezone. If none is specified, UTC is used as fallback. The list of valid input values matches that of the IANA Time Zone Database (TZDB). It accepts values in their canonical names like 'Europe/Paris', the abbreviated version like CET or the UTC offset format like '+01:00' |
1034
1009
 
1035
1010
  ### PositionInfo
1036
1011
 
1037
-
1038
-
1039
-
1040
1012
  The exact position in the query string.
1041
1013
 
1042
1014
  | Name | Type | Description |
@@ -1046,84 +1018,66 @@ The exact position in the query string.
1046
1018
  |line<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Query position line zero based index. |
1047
1019
 
1048
1020
  ### QueryOptions
1049
- **type**: Record&lt;string, string | undefined&gt;
1050
-
1051
-
1052
1021
 
1053
1022
  Query options enhance query functionality for Dynatrace internal services.
1054
1023
 
1055
- ### QueryPollResponse
1056
-
1057
-
1024
+ **type**: Record&lt;string, string | undefined&gt;
1058
1025
 
1026
+ ### QueryPollResponse
1059
1027
 
1060
1028
  The response of GET query:execute call.
1061
1029
 
1062
1030
  | Name | Type | Description |
1063
1031
  | --- | --- | --- |
1064
1032
  |progress|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The progress of the query from 0 to 100. |
1065
- |result|<a href="#queryresult">QueryResult</a>| |
1066
- |state<sup>*required</sup>|QueryState| |
1033
+ |result|<a href="#queryresult" target="_blank" rel="noopener noreferrer">QueryResult</a>|The result of the DQL query. |
1034
+ |state<sup>*required</sup>|"NOT_STARTED" &#124; "RUNNING" &#124; "SUCCEEDED" &#124; "RESULT_GONE" &#124; "CANCELLED" &#124; "FAILED"|Possible state of the query. |
1067
1035
  |ttlSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Time to live in seconds. |
1068
1036
 
1069
1037
  ### QueryResult
1070
1038
 
1071
-
1072
-
1073
-
1074
1039
  The result of the DQL query.
1075
1040
 
1076
1041
  | Name | Type | Description |
1077
1042
  | --- | --- | --- |
1078
- |metadata<sup>*required</sup>|<a href="#metadata" target="_blank" rel="noopener noreferrer">Metadata</a>| |
1079
- |records<sup>*required</sup>|Array&lt;null &#124; <a href="#resultrecord">ResultRecord</a>&gt;|List of records containing the result fields data. |
1080
- |types<sup>*required</sup>|Array&lt;<a href="#rangedfieldtypes" target="_blank" rel="noopener noreferrer">RangedFieldTypes</a>&gt;|The data types for the result records. |
1043
+ |metadata<sup>*required</sup>|<a href="#metadata">Metadata</a>|Collects various bits of metadata information. |
1044
+ |records<sup>*required</sup>|Array&lt;null &#124; <a href="#resultrecord" target="_blank" rel="noopener noreferrer">ResultRecord</a>&gt;|List of records containing the result fields data. |
1045
+ |types<sup>*required</sup>|Array&lt;<a href="#rangedfieldtypes">RangedFieldTypes</a>&gt;|The data types for the result records. |
1081
1046
 
1082
1047
  ### QueryStartResponse
1083
1048
 
1084
-
1085
-
1086
-
1087
1049
  The response when starting a query.
1088
1050
 
1089
1051
  | Name | Type | Description |
1090
1052
  | --- | --- | --- |
1091
1053
  |progress|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The progress of the query from 0 to 100. |
1092
1054
  |requestToken|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The token returned by the POST query:execute call. |
1093
- |result|<a href="#queryresult">QueryResult</a>| |
1094
- |state<sup>*required</sup>|QueryState| |
1055
+ |result|<a href="#queryresult" target="_blank" rel="noopener noreferrer">QueryResult</a>|The result of the DQL query. |
1056
+ |state<sup>*required</sup>|"NOT_STARTED" &#124; "RUNNING" &#124; "SUCCEEDED" &#124; "RESULT_GONE" &#124; "CANCELLED" &#124; "FAILED"|Possible state of the query. |
1095
1057
  |ttlSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Time to live in seconds. |
1096
1058
 
1097
1059
  ### RangedFieldTypes
1098
1060
 
1099
-
1100
-
1101
-
1102
1061
  The field type in range.
1103
1062
 
1104
1063
  | Name | Type | Description |
1105
1064
  | --- | --- | --- |
1106
1065
  |indexRange|Array&lt;[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)&gt;|The range of elements at use this type in arrays (null for records). |
1107
- |mappings<sup>*required</sup>|<a href="#rangedfieldtypesmappings" target="_blank" rel="noopener noreferrer">RangedFieldTypesMappings</a>| |
1066
+ |mappings<sup>*required</sup>|<a href="#rangedfieldtypesmappings">RangedFieldTypesMappings</a>|The mapping between the field name and data type. |
1108
1067
 
1109
1068
  ### RangedFieldTypesMappings
1110
- **type**: Record&lt;string, FieldType | undefined&gt;
1111
-
1112
-
1113
1069
 
1114
1070
  The mapping between the field name and data type.
1115
1071
 
1116
- ### ResultRecord
1117
- **type**: Record&lt;string, ResultRecordValue | null | undefined&gt;
1118
-
1072
+ **type**: Record&lt;string, FieldType | undefined&gt;
1119
1073
 
1074
+ ### ResultRecord
1120
1075
 
1121
1076
  Single record that contains the result fields.
1122
1077
 
1123
- ### Timeframe
1124
-
1125
-
1078
+ **type**: Record&lt;string, ResultRecordValue | null | undefined&gt;
1126
1079
 
1080
+ ### Timeframe
1127
1081
 
1128
1082
  DQL data type timeframe.
1129
1083
 
@@ -1134,42 +1088,31 @@ DQL data type timeframe.
1134
1088
 
1135
1089
  ### TokenPosition
1136
1090
 
1137
-
1138
-
1139
-
1140
1091
  The position of a token in a query string used for errors and notification to map the message to a specific part of the query.
1141
1092
 
1142
- | Name | Type |
1143
- | --- | --- |
1144
- |end<sup>*required</sup>|<a href="#positioninfo">PositionInfo</a>|
1145
- |start<sup>*required</sup>|<a href="#positioninfo" target="_blank" rel="noopener noreferrer">PositionInfo</a>|
1093
+ | Name | Type | Description |
1094
+ | --- | --- | --- |
1095
+ |end<sup>*required</sup>|<a href="#positioninfo" target="_blank" rel="noopener noreferrer">PositionInfo</a>|The exact position in the query string. |
1096
+ |start<sup>*required</sup>|<a href="#positioninfo">PositionInfo</a>|The exact position in the query string. |
1146
1097
 
1147
1098
  ### VerifyRequest
1148
1099
 
1149
-
1150
-
1151
-
1152
-
1153
-
1154
1100
  | Name | Type | Description |
1155
1101
  | --- | --- | --- |
1156
1102
  |generateCanonicalQuery|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| <i>default:</i> <code>false</code>|
1157
1103
  |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query locale. If none specified, then a language/country neutral locale is chosen. The input values take the ISO-639 Language code with an optional ISO-3166 country code appended to it with an underscore. For instance, both values are valid 'en' or 'en_US'. |
1158
1104
  |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
1159
- |queryOptions|<a href="#queryoptions">QueryOptions</a>| |
1105
+ |queryOptions|<a href="#queryoptions" target="_blank" rel="noopener noreferrer">QueryOptions</a>|Query options enhance query functionality for Dynatrace internal services. |
1160
1106
  |timezone|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query timezone. If none is specified, UTC is used as fallback. The list of valid input values matches that of the IANA Time Zone Database (TZDB). It accepts values in their canonical names like 'Europe/Paris', the abbreviated version like CET or the UTC offset format like '+01:00' |
1161
1107
 
1162
1108
  ### VerifyResponse
1163
1109
 
1164
-
1165
-
1166
-
1167
1110
  Verify response.
1168
1111
 
1169
1112
  | Name | Type | Description |
1170
1113
  | --- | --- | --- |
1171
1114
  |canonicalQuery|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
1172
- |notifications|Array&lt;<a href="#metadatanotification" target="_blank" rel="noopener noreferrer">MetadataNotification</a>&gt;|The notifications related to the supplied DQL query string. |
1115
+ |notifications|Array&lt;<a href="#metadatanotification">MetadataNotification</a>&gt;|The notifications related to the supplied DQL query string. |
1173
1116
  |valid<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the supplied DQL query string is valid. |
1174
1117
 
1175
1118
  ## Enums