@dynatrace-sdk/client-query 1.9.1 → 1.10.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.
package/README.md CHANGED
@@ -1,25 +1,1161 @@
1
1
  # @dynatrace-sdk/client-query
2
2
 
3
- [![npm](https://img.shields.io/badge/npm-v1.9.1-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.9.1)
3
+ [![npm](https://img.shields.io/badge/npm-v1.10.1-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-query/v/1.10.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
7
7
 
8
+
8
9
  ## Installation
9
10
 
10
11
  ```bash
11
12
  npm install @dynatrace-sdk/client-query
12
13
  ```
13
14
 
14
- ## API reference
15
-
16
- Full API reference for this SDK is available at [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-query/).
17
15
 
18
16
  ## Getting help
19
17
 
20
18
  - Visit [SDK for Typescript](https://developer.dynatrace.com/reference/sdks/) guide in the [Dynatrace Developer](https://developer.dynatrace.com/)
21
19
  - Ask a question in the [Dynatrace Community](https://community.dynatrace.com/)
22
20
 
21
+
23
22
  ## License
24
23
 
25
24
  This SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see LICENSE for more information.
25
+
26
+
27
+ # API reference
28
+
29
+ Full API reference for the latest version of the SDK is also available at the [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-query/).
30
+
31
+ ## queryAssistanceClient
32
+
33
+ ```js
34
+ import { queryAssistanceClient } from '@dynatrace-sdk/client-query';
35
+ ```
36
+
37
+
38
+ ### queryAutocomplete
39
+
40
+ <div class="padding-bottom--md">
41
+ <strong>queryAssistanceClient.queryAutocomplete(config): Promise&lt;[AutocompleteResponse](#autocompleteresponse)&gt;</strong>
42
+
43
+ <div class="padding-left--md">
44
+
45
+ Get a structured list of suggestions for the query at the given position.
46
+
47
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
48
+
49
+ ## Overview
50
+
51
+ We provide a list of suggestions that may be used after the cursor position. The following queries will all provide the
52
+ same results:
53
+
54
+ * `query: "f"`
55
+ * `query: "f", cursorPosition:1`
56
+ * `query: "fetch ", cursorPosition:1`
57
+
58
+ Available fields:
59
+
60
+ | Field | Description |
61
+ |-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
62
+ | suggestions | a list of suggestions. Each item is a separate possible suggestion, despite they might have the same outputs. |
63
+ | optional | whether the suggestion is optional. If `true`, the query until the cursor position might work. If `false`, the query is definitely incomplete or invalid if cut at the cursor position. |
64
+
65
+ Fields in the `suggestions`
66
+
67
+ | Field | Description |
68
+ |------------------------|------------------------------------------------------------------------------------------------------------|
69
+ | suggestion | a string representing the whole suggestion. This information could also be derived from the parts. |
70
+ | alreadyTypedCharacters | how many characters of this suggestion have already been typed (and will be overridden by the suggestion). |
71
+ | parts | a list of semantically enriched information on what are the parts of a suggestion. |
72
+
73
+ Fields in `parts`
74
+
75
+ | Field | Description |
76
+ |------------|-----------------------------------------------------------|
77
+ | suggestion | a string representing the current part of the suggestion. |
78
+ | type | current types: SPACE, PIPE, COMMAND (may be extended) |
79
+
80
+ The `type` helps to treat specific parts of the suggestion different to others; either by a different visualization,
81
+ a link to docs, etc.
82
+
83
+
84
+
85
+ </div>
86
+
87
+
88
+ #### Parameters
89
+
90
+ | Name | Type| Description|
91
+ |---|---|---|
92
+ |config.authorization|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The authorization context. Typically start with 'Bearer '. |
93
+ |config.body<sup>*required</sup>|[AutocompleteRequest](#autocompleterequest)| |
94
+
95
+
96
+
97
+
98
+ #### Returns
99
+
100
+ A list of structured autocomplete suggestions.
101
+
102
+
103
+ <details>
104
+ <summary>
105
+ Code example
106
+
107
+ </summary>
108
+
109
+ ```ts
110
+ import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
111
+
112
+ const data = await queryAssistanceClient.queryAutocomplete({
113
+ body: {
114
+ query:
115
+ 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
116
+ },
117
+ });
118
+ ```
119
+
120
+ </details>
121
+
122
+
123
+
124
+ </div>
125
+
126
+
127
+ ### queryParse
128
+
129
+ <div class="padding-bottom--md">
130
+ <strong>queryAssistanceClient.queryParse(config): Promise&lt;[DQLNode](#dqlnode)&gt;</strong>
131
+
132
+ <div class="padding-left--md">
133
+
134
+ Get a structured tree of the canonical form of the query.
135
+
136
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
137
+
138
+ ## Overview
139
+
140
+ Returns the parsed query as a tree, containing the structure of the canonical query. Tree-nodes can contain references to
141
+ the token position where they originate from. This may help to provide hover effects, show canonical forms, mark
142
+ optional items, and more.
143
+
144
+ ## Details
145
+
146
+ The query tree consists of nodes that contain different additional information (everything optional):
147
+
148
+ ### General Fields
149
+
150
+ Field | Mandatory | Description
151
+ ----------------------- | --- | ----------------------------------------------------------------------------------------
152
+ tokenPosition | no | optional. If present, it represents the position within the query string where the node refers to.
153
+ isOptional | no | whether this node could be left out and the result would still be the same query (semantically).
154
+
155
+ #### tokenPosition
156
+
157
+ contains `start` (inclusive) and `end` (inclusive), both contain `index` (0 based; fur substrings), `line`
158
+ and `column` (both 1-based; for readability).
159
+
160
+ * If `tokenPosition` is present, it always contains start and end with all fields
161
+ * If `tokenPosition` is not present, there might still be nested nodes that do contain a position
162
+ * If `start == end`, the position refers to a single character
163
+ * If `start > end`, we know for sure that something was inserted.
164
+
165
+ We can always check whether the canonical representation of a node matches the text in the tokenPosition to see whether
166
+ something was inserted, removed, or changed.
167
+
168
+ #### isOptional
169
+
170
+ only present if it is true.
171
+
172
+ Optional nodes can e.g. be optional braces that make a query more readable, but are not necessary. This could be used to
173
+ enter *ghost braces* and *implicit functions* in the user&apos;s input field; maybe with different formatting
174
+ (using the tokenPosition of sibling nodes we can also check whether the user wrote these or not).
175
+
176
+ ### Advanced Token Types
177
+
178
+ each node is of one of following types and may contain more fields:
179
+
180
+ * Terminal Node
181
+ * ContainerNode
182
+ * Alternative Node
183
+
184
+ #### Terminal Node
185
+
186
+ can be identified by checking whether `canonicalString` is present
187
+
188
+ Field | Mandatory | Description
189
+ ------------------------ | --- | ---------------------------------------------------------------------------------------
190
+ type | yes | the type of the terminal node - do not confuse with the type of container nodes
191
+ canonicalString | yes | the canonical string representation. Concatenating the canonicalString of all nested terminal nodes provides the canonical form of the query.
192
+ isMandatoryOnUserOrder | no | may only be present if (`type="BRACE_OPEN"` or `type="BRACE_CLOSE"`) and `isOptional=true`. For usage see section Special node type: PARAMETERS
193
+
194
+ ##### Current types of terminal nodes (list might grow):
195
+
196
+ * SPACE
197
+ * LINEBREAK
198
+ * INDENT
199
+ * PIPE
200
+ * DOT
201
+ * COLON
202
+ * COMMA
203
+ * BRACE_OPEN
204
+ * BRACE_CLOSE
205
+ * BRACKET_OPEN
206
+ * BRACKET_CLOSE
207
+ * PARENTHESIS_OPEN
208
+ * PARENTHESIS_CLOSE
209
+ * QUOTE
210
+ * SLASH
211
+ * BOOLEAN_TRUE
212
+ * BOOLEAN_FALSE
213
+ * NULL
214
+ * COMMAND_NAME
215
+ * PARAMETER_KEY
216
+ * PARAMETER_VALUE_SCOPE
217
+ * FUNCTION_NAME
218
+ * OPERATOR
219
+ * TRAVERSAL_OPERATOR
220
+ * TRAVERSAL_RELATION_NAME
221
+ * TRAVERSAL_HOP_COUNT
222
+ * SIMPLE_IDENTIFIER
223
+ * NUMBER
224
+ * STRING
225
+ * TIME_UNIT
226
+ * TIMESTAMP_VALUE
227
+ * METRIC_KEY
228
+ * VARIABLE
229
+
230
+ #### ContainerNode
231
+
232
+ can be identified by checking whether `children` is present
233
+
234
+ Field | Mandatory | Description
235
+ ----------------------- | --- | ----------------------------------------------------------------------------------------
236
+ type | yes | the type of the container node - do not confuse with the type of terminal nodes
237
+ children | yes | the children for the node. might be of any type
238
+
239
+ ##### Current types of container nodes (list might grow):
240
+
241
+ * QUERY
242
+ * EXECUTION_BLOCK
243
+ * COMMAND
244
+ * COMMAND_SEPARATOR
245
+ * PARAMETER_WITH_KEY
246
+ * GROUP
247
+ * PARAMETERS - check examples further down
248
+ * PARAMETER_NAMING
249
+ * PARAMETER_SEPARATOR
250
+ * FUNCTION
251
+ * FUNCTION_PART - check examples further down
252
+ * EXPRESSION
253
+ * IDENTIFIER
254
+ * SOURCE_ID
255
+ * DURATION
256
+ * TIMESTAMP
257
+ * TIMEFRAME
258
+ * TRAVERSAL_PATH
259
+ * TRAVERSAL_STEP
260
+
261
+ ##### Special node type: PARAMETERS
262
+
263
+ can contain children representing the parameters. Every second child is of type PARAMETER_SEPARATOR.
264
+
265
+ You may reorder the children based on their tokenPosition to get the user order. However, in this case,
266
+ you need to consider `isMandatoryOnUserOrder` to determine whether the grouping braces are mandatory or not.
267
+
268
+ ###### Example
269
+
270
+ For the query `SORT a, {direction:"descending", b}`, the canonical form is:
271
+
272
+ `SORT a, {b, direction:"descending"}`
273
+
274
+ This is the order, in which the parameters are returned in the query tree.
275
+ Parameters are \{a} and \{\{b} and \{direction:&quot;descending&quot;}}. In this case, the braces are optional.
276
+
277
+ `SORT a, {b, direction:"descending"}` is equivalent to `SORT a, b, direction:"descending"`
278
+
279
+ However, if you reorder the children by tokenPosition, the braces are not optional, because
280
+
281
+ `SORT a, direction:"descending", b` is interpreted as `SORT {a, direction:"descending"}, b`
282
+
283
+ So, if the children in PARAMETERS are re-ordered by tokenPosition, braces (or in general: TerminalNodes)
284
+ are only optional if `isOptional && !isMandatoryOnUserOrder`.
285
+
286
+ ##### Special node type: FUNCTION_PART
287
+
288
+ A container node of type `FUNCTION` may contain nodes of type `FUNCTION_PART`.
289
+
290
+ If those `FUNCTION_PART`s are marked as optional, this means you have to either include *all* or *none* of these
291
+ optional function parts.
292
+
293
+ *Example*:
294
+
295
+ `filter anyMatch(a.b == 1, input:a)`
296
+
297
+ The optional function parts are `anyMatch(` and `, input:a)`. If you leave out both, the command will still work:
298
+ `filter a.b == 1` and return the same result. Using one of these optional function parts and removing the other will lead
299
+ to an invalid query.
300
+
301
+ #### Alternative Node
302
+
303
+ can be identified by checking whether `alternatives` is present
304
+
305
+ Field | Mandatory | Description
306
+ ----------------------- | --- | ----------------------------------------------------------------------------------------
307
+ alternatives | yes | Type: Map&amp;lt;AlternativeType, DQLNode&amp;gt;
308
+
309
+ When displaying the query, pick one option. You may use the other options for hovering, replacing, and more.
310
+
311
+ ##### Current values of AlternativeType (list might grow):
312
+
313
+ * CANONICAL: This node is the one we will use for our canonical form
314
+ * USER: An alternative that is also valid, but not canonical; and this version was picked by the user.
315
+ * INFO: only if the canonical version is not present
316
+
317
+ *Examples*:
318
+
319
+ * `CANONICAL` is not present, `USER` is present: user&apos;s nodes are optional, but not canonical (usually optional nodes
320
+ are still canonical)
321
+ * `CANONICAL` is present, `USER` is not present: same as if the canonical node was optional. If this happens, it is
322
+ likely that there is also an `INFO` node
323
+ * `CANONICAL` is present, `USER` is present: there are different alternatives
324
+ * `INFO` is present: usually if `CANONICAL` is not present (e.g. the parameter key for `FILTER a == 1`), there is an info node
325
+ for `FILTER condition:a == 1`. This `condition:` was neither written by the user nor is it canonical; but it might be
326
+ used to help the user understand what this parameter means.
327
+
328
+
329
+
330
+ </div>
331
+
332
+
333
+ #### Parameters
334
+
335
+ | Name | Type| Description|
336
+ |---|---|---|
337
+ |config.authorization|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The authorization context. Typically start with 'Bearer '. |
338
+ |config.body<sup>*required</sup>|[ParseRequest](#parserequest)| |
339
+
340
+
341
+
342
+
343
+ #### Returns
344
+
345
+ 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.
346
+
347
+
348
+ <details>
349
+ <summary>
350
+ Code example
351
+
352
+ </summary>
353
+
354
+ ```ts
355
+ import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
356
+
357
+ const data = await queryAssistanceClient.queryParse({
358
+ body: {
359
+ query:
360
+ 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
361
+ },
362
+ });
363
+ ```
364
+
365
+ </details>
366
+
367
+
368
+
369
+ </div>
370
+
371
+
372
+ ### queryVerify
373
+
374
+ <div class="padding-bottom--md">
375
+ <strong>queryAssistanceClient.queryVerify(config): Promise&lt;[VerifyResponse](#verifyresponse)&gt;</strong>
376
+
377
+ <div class="padding-left--md">
378
+
379
+ Verifies a query without executing it.
380
+
381
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
382
+
383
+ ## Overview
384
+
385
+ Verifies the supplied query string and other query parameters for lack of any errors, but without actually
386
+ submitting the query for execution.
387
+
388
+
389
+
390
+ </div>
391
+
392
+
393
+ #### Parameters
394
+
395
+ | Name | Type| Description|
396
+ |---|---|---|
397
+ |config.authorization|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The authorization context. Typically start with 'Bearer '. |
398
+ |config.body<sup>*required</sup>|[VerifyRequest](#verifyrequest)| |
399
+
400
+
401
+
402
+
403
+ #### Returns
404
+
405
+ Supplied query and parameters were verified.
406
+
407
+
408
+ <details>
409
+ <summary>
410
+ Code example
411
+
412
+ </summary>
413
+
414
+ ```ts
415
+ import { queryAssistanceClient } from "@dynatrace-sdk/client-query";
416
+
417
+ const data = await queryAssistanceClient.queryVerify({
418
+ body: {
419
+ query:
420
+ 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
421
+ },
422
+ });
423
+ ```
424
+
425
+ </details>
426
+
427
+
428
+
429
+ </div>
430
+
431
+ ## queryExecutionClient
432
+
433
+ ```js
434
+ import { queryExecutionClient } from '@dynatrace-sdk/client-query';
435
+ ```
436
+
437
+
438
+ ### queryCancel
439
+
440
+ <div class="padding-bottom--md">
441
+ <strong>queryExecutionClient.queryCancel(config): Promise&lt;void &#124; [QueryPollResponse](#querypollresponse)&gt;</strong>
442
+
443
+ <div class="padding-left--md">
444
+
445
+ Cancels the query and returns the result if the query was already finished, otherwise discards it.
446
+
447
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
448
+
449
+ ### Overview:
450
+
451
+ Cancels a running Grail query and returns a list of records if the query already finished.
452
+
453
+ ### The response format:
454
+
455
+ If the query was already finished, a response body including the result will be returned. Otherwise the response will contain no body.
456
+
457
+ The result has three main sections:
458
+ * the &apos;records&apos; section contains the individual records, where each record consists of a set of fields and their corresponding values.
459
+ * the &apos;types&apos; section describes the corresponding data types that a record field has.
460
+ * the &apos;metadata&apos; section contains information about the query like &apos;analysisTimeframe&apos;, &apos;timezone&apos; or &apos;locale&apos;.
461
+
462
+ Every record has an implicit &apos;index&apos; according to the position in the &apos;records&apos; JSON array.
463
+ The types section has a list of 1..N possible type &apos;buckets&apos;. Each such bucket has an &apos;indexRange&apos; which indicates which
464
+ records will find their field types in which bucket. The index range has two values start &amp; end and can be thought of as [startIndex, endIndex).
465
+
466
+ A field part of a record with index &apos;i&apos; will find its corresponding field type by first locating the bucket that satisfies:
467
+
468
+ ```text
469
+ startIndex <= i <= endIndex
470
+ ```
471
+
472
+ Once the bucket is found the &apos;mappings&apos; object has an entry for all the fields that are part of that record with index &apos;i&apos;.
473
+
474
+
475
+ Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
476
+ field name but their values are of a different type. This phenomenon will hence forth be named as a **&quot;collision&quot;**.
477
+ When a collision does occur, we will create a new type &apos;bucket&apos; that will have a different index range where
478
+ the new record field types will be placed.
479
+ It is guaranteed that every field of every record will have a corresponding type.
480
+ **Clients should always take the included types into account when consuming records!**
481
+
482
+
483
+
484
+ </div>
485
+
486
+
487
+ #### Parameters
488
+
489
+ | Name | Type| Description|
490
+ |---|---|---|
491
+ |config.enrich|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|If set additional data will be available in the metadata section. |
492
+ |config.requestToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The request-token of the query. |
493
+
494
+
495
+
496
+
497
+ #### Returns
498
+
499
+ The query already finished.
500
+
501
+
502
+ <details>
503
+ <summary>
504
+ Code example
505
+
506
+ </summary>
507
+
508
+ ```ts
509
+ import { queryExecutionClient } from "@dynatrace-sdk/client-query";
510
+
511
+ const data = await queryExecutionClient.queryCancel({
512
+ requestToken: "...",
513
+ });
514
+ ```
515
+
516
+ </details>
517
+
518
+
519
+
520
+ </div>
521
+
522
+
523
+ ### queryExecute
524
+
525
+ <div class="padding-bottom--md">
526
+ <strong>queryExecutionClient.queryExecute(config): Promise&lt;[QueryStartResponse](#querystartresponse)&gt;</strong>
527
+
528
+ <div class="padding-left--md">
529
+
530
+ Starts a Grail query.
531
+
532
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
533
+
534
+ ### Overview:
535
+
536
+ Executes a query and returns a list of records.
537
+
538
+ For details about the query language see the [Dynatrace Query Language documentation](https://dt-url.net/bv03yk8).
539
+
540
+ ### The response format:
541
+
542
+ The json response will contain the state of the started query. If the query succeeded, the result will be included. Otherwise the response will contain a request token to reference the query in future polling requests.
543
+
544
+ The result has two main sections:
545
+ * The &apos;records&apos; section contains the individual records, where each record consists of a set of fields and their corresponding values.
546
+ * The &apos;types&apos; section describes the corresponding data types that a record field has.
547
+
548
+ Every record has an implicit &apos;index&apos; according to the position in the &apos;records&apos; JSON array.
549
+ The types section has a list of 1..N possible type &apos;buckets&apos;. Each such bucket has an &apos;indexRange&apos; which indicates which
550
+ records will find their field types in which bucket. The index range has two values start &amp; end and can be thought of as [startIndex, endIndex).
551
+
552
+ A field part of a record with index &apos;i&apos; will find its corresponding field type by first locating the bucket that satisfies:
553
+
554
+ ```text
555
+ startIndex <= i <= endIndex
556
+ ```
557
+
558
+ Once the bucket is found the &apos;mappings&apos; object has an entry for all the fields that are part of that record with index &apos;i&apos;.
559
+
560
+
561
+ Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
562
+ field name but their values are of a different type. This phenomenon will hence forth be named as a **&quot;collision&quot;**.
563
+ When a collision does occur, we will create a new type &apos;bucket&apos; that will have a different index range where
564
+ the new record field types will be placed.
565
+ It is guaranteed that every field of every record will have a corresponding type.
566
+ **Clients should always take the included types into account when consuming records!**
567
+
568
+
569
+
570
+ </div>
571
+
572
+
573
+ #### Parameters
574
+
575
+ | Name | Type| Description|
576
+ |---|---|---|
577
+ |config.authorization|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The authorization context. Typically start with 'Bearer '. |
578
+ |config.body<sup>*required</sup>|[ExecuteRequest](#executerequest)| |
579
+ |config.enrich|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|If set additional data will be available in the metadata section. |
580
+
581
+
582
+
583
+
584
+ #### Returns
585
+
586
+ The final status and results of the supplied query if it finished within a supplied requestTimeoutMilliseconds. | The status of the query to start.
587
+
588
+
589
+ <details>
590
+ <summary>
591
+ Code example
592
+
593
+ </summary>
594
+
595
+ ```ts
596
+ import { queryExecutionClient } from "@dynatrace-sdk/client-query";
597
+
598
+ const data = await queryExecutionClient.queryExecute({
599
+ body: {
600
+ query:
601
+ 'fetch events | filter event.type == "davis" AND davis.status != "CLOSED" | fields timestamp, davis.title, davis.underMaintenance, davis.status | sort timestamp | limit 10',
602
+ },
603
+ });
604
+ ```
605
+
606
+ </details>
607
+
608
+
609
+
610
+ </div>
611
+
612
+
613
+ ### queryPoll
614
+
615
+ <div class="padding-bottom--md">
616
+ <strong>queryExecutionClient.queryPoll(config): Promise&lt;[QueryPollResponse](#querypollresponse)&gt;</strong>
617
+
618
+ <div class="padding-left--md">
619
+
620
+ Retrieves query status and final result from Grail.
621
+
622
+ For information about the required permissions see the [Bucket and table permissions in Grail documentation](https://docs.dynatrace.com/docs/shortlink/assign-bucket-table-permissions).
623
+
624
+ ### Overview:
625
+
626
+ Polls the status of a Grail query. Returns the status of the query, including the result if the query finished.
627
+
628
+ ### The response format:
629
+ The json response will contain the state of the query. If the query succeeded, the result will be included.
630
+
631
+ The result has two main sections:
632
+ * The &apos;records&apos; section contains the individual records, where each record consists of a set of fields and their corresponding values.
633
+ * The &apos;types&apos; section describes the corresponding data types that a record field has.
634
+
635
+ Every record has an implicit &apos;index&apos; according to the position in the &apos;records&apos; JSON array.
636
+ The types section has a list of 1..N possible type &apos;buckets&apos;. Each such bucket has an &apos;indexRange&apos; which indicates which
637
+ records will find their field types in which bucket. The index range has two values start &amp; end and can be thought of as [startIndex, endIndex).
638
+
639
+ A field part of a record with index &apos;i&apos; will find its corresponding field type by first locating the bucket that satisfies:
640
+
641
+ ```text
642
+ startIndex <= i <= endIndex
643
+ ```
644
+
645
+ Once the bucket is found the &apos;mappings&apos; object has an entry for all the fields that are part of that record with index &apos;i&apos;.
646
+
647
+
648
+ Since enforcement of a particular schema is absent at ingestion time, it is possible to have records that share the same
649
+ field name but their values are of a different type. This phenomenon will hence forth be named as a **&quot;collision&quot;**.
650
+ When a collision does occur, we will create a new type &apos;bucket&apos; that will have a different index range where
651
+ the new record field types will be placed.
652
+ It is guaranteed that every field of every record will have a corresponding type.
653
+ **Clients should always take the included types into account when consuming records!**
654
+
655
+
656
+
657
+ </div>
658
+
659
+
660
+ #### Parameters
661
+
662
+ | Name | Type| Description|
663
+ |---|---|---|
664
+ |config.enrich|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|If set additional data will be available in the metadata section. |
665
+ |config.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 query status is returned. |
666
+ |config.requestToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The request-token of the query. |
667
+
668
+
669
+
670
+
671
+ #### Returns
672
+
673
+ The current status and results of the supplied query.
674
+
675
+
676
+ <details>
677
+ <summary>
678
+ Code example
679
+
680
+ </summary>
681
+
682
+ ```ts
683
+ import { queryExecutionClient } from "@dynatrace-sdk/client-query";
684
+
685
+ const data = await queryExecutionClient.queryPoll({
686
+ requestToken: "...",
687
+ });
688
+ ```
689
+
690
+ </details>
691
+
692
+
693
+
694
+ </div>
695
+
696
+ ## Types
697
+
698
+ ### AutocompleteRequest
699
+
700
+
701
+
702
+
703
+
704
+ | Name | Type| Description|
705
+ |---|---|---|
706
+ |cursorPosition|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
707
+ |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'. |
708
+ |maxDataSuggestions|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
709
+ |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
710
+ |queryOptions|[QueryOptions](#queryoptions)| |
711
+ |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' |
712
+
713
+ ### AutocompleteResponse
714
+
715
+
716
+
717
+ The response of the autocomplete call.
718
+
719
+ | Name | Type| Description|
720
+ |---|---|---|
721
+ |optional<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the suggestions are optional. |
722
+ |suggestedTtlSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Suggested duration in seconds, for how long the response may be cached and reused by the client. It is derived from the volatility of the suggestions on the server (if the suggestions are static, how long the server will cache the volatile suggestions, ...). If not provided, then the result may be cached for long time. Value below 1 means that the result should not be cached. |
723
+ |suggestions<sup>*required</sup>|Array&lt;[AutocompleteSuggestion](#autocompletesuggestion)&gt;|The list of suggestions. |
724
+
725
+ ### AutocompleteSuggestion
726
+
727
+
728
+
729
+ Single suggestion for completion of the query.
730
+
731
+ | Name | Type| Description|
732
+ |---|---|---|
733
+ |alreadyTypedCharacters<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Number of characters that the user user already typed for this suggestion. |
734
+ |parts<sup>*required</sup>|Array&lt;[AutocompleteSuggestionPart](#autocompletesuggestionpart)&gt;|List of suggestion parts. |
735
+ |suggestion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The suggested continuation of the query. |
736
+
737
+ ### AutocompleteSuggestionPart
738
+
739
+
740
+
741
+ Part of the suggestion.
742
+
743
+ | Name | Type| Description|
744
+ |---|---|---|
745
+ |info|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The type of the suggestion. |
746
+ |suggestion<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The suggested continuation of the query. |
747
+ |synopsis|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The synopsis of the suggestion. |
748
+ |type<sup>*required</sup>|TokenType| |
749
+
750
+ ### DQLAlternativeNode
751
+
752
+
753
+
754
+ The DQL node that has alternatives.
755
+
756
+ | Name | Type| Description|
757
+ |---|---|---|
758
+ |alternatives|object|The different alternatives. |
759
+ |isOptional<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the node is optional. |
760
+ |nodeType<sup>*required</sup>|DQLNodeNodeType| |
761
+ |tokenPosition|[TokenPosition](#tokenposition)| |
762
+
763
+ ### DQLContainerNode
764
+
765
+
766
+
767
+ The DQL node that contains other nodes.
768
+
769
+ | Name | Type| Description|
770
+ |---|---|---|
771
+ |children|Array&lt;[DQLNode](#dqlnode)&gt;|The list of children nodes. |
772
+ |isOptional<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the node is optional. |
773
+ |nodeType<sup>*required</sup>|DQLNodeNodeType| |
774
+ |tokenPosition|[TokenPosition](#tokenposition)| |
775
+ |type|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The type of the node. |
776
+
777
+ ### DQLNode
778
+
779
+
780
+
781
+ General Node in the DQL query.
782
+
783
+ | Name | Type| Description|
784
+ |---|---|---|
785
+ |isOptional<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the node is optional. |
786
+ |nodeType<sup>*required</sup>|DQLNodeNodeType| |
787
+ |tokenPosition|[TokenPosition](#tokenposition)| |
788
+
789
+ ### DQLTerminalNode
790
+
791
+
792
+
793
+ Node that represents single token.
794
+
795
+ | Name | Type| Description|
796
+ |---|---|---|
797
+ |canonicalString|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Canonical form. |
798
+ |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' |
799
+ |isOptional<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the node is optional. |
800
+ |nodeType<sup>*required</sup>|DQLNodeNodeType| |
801
+ |tokenPosition|[TokenPosition](#tokenposition)| |
802
+ |type|TokenType| |
803
+
804
+ ### ErrorEnvelope
805
+
806
+
807
+
808
+ An &apos;envelope&apos; error object that has the mandatory error object.
809
+
810
+ | Name | Type|
811
+ |---|---|
812
+ |error<sup>*required</sup>|[ErrorResponse](#errorresponse)|
813
+
814
+ ### ErrorResponse
815
+
816
+
817
+
818
+ The response for error state
819
+
820
+ | Name | Type| Description|
821
+ |---|---|---|
822
+ |code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Error code, which normally matches the HTTP error code. |
823
+ |details<sup>*required</sup>|[ErrorResponseDetails](#errorresponsedetails)| |
824
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A short, clear error message without details |
825
+
826
+ ### ErrorResponseDetails
827
+
828
+
829
+
830
+ Detailed information about the error.
831
+
832
+ | Name | Type| Description|
833
+ |---|---|---|
834
+ |arguments<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The arguments for the message format. |
835
+ |errorMessage<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Complete error message. |
836
+ |errorMessageFormat<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The message format of the error message, string.format based. |
837
+ |errorMessageFormatSpecifierTypes<sup>*required</sup>|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. |
838
+ |errorType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The error type, e.g. COMMAND_NAME_MISSING |
839
+ |exceptionType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The exception type. |
840
+ |queryId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
841
+ |queryString<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Submitted query string. |
842
+ |syntaxErrorPosition|[TokenPosition](#tokenposition)| |
843
+
844
+ ### ExecuteRequest
845
+
846
+
847
+
848
+
849
+
850
+ | Name | Type| Description|
851
+ |---|---|---|
852
+ |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. |
853
+ |defaultScanLimitGbytes|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Limit in gigabytes for the amount data that will be scanned during read. |
854
+ |defaultTimeframeEnd|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query timeframe 'end' timestamp in ISO-8601 or RFC399 format. If the timeframe 'start' 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> |
855
+ |defaultTimeframeStart|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The query timeframe 'start' timestamp in ISO-8601 or RFC399 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> |
856
+ |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. |
857
+ |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. |
858
+ |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'. |
859
+ |maxResultBytes|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The maximum number of result bytes that this query will return. |
860
+ |maxResultRecords|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The maximum number of result records that this query will return. |
861
+ |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
862
+ |queryOptions|[QueryOptions](#queryoptions)| |
863
+ |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. |
864
+ |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' |
865
+
866
+ ### FieldType
867
+
868
+
869
+
870
+ The possible type of a field in DQL.
871
+
872
+ | Name | Type|
873
+ |---|---|
874
+ |type<sup>*required</sup>|FieldTypeType|
875
+ |types|Array&lt;[RangedFieldTypes](#rangedfieldtypes)&gt;|
876
+
877
+ ### GeoPoint
878
+
879
+
880
+
881
+ DQL data type representing a geolocation point.
882
+
883
+ | Name | Type| Description|
884
+ |---|---|---|
885
+ |latitude<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The coordinate that specifies the north-south position of a point on the surface of the earth. |
886
+ |longitude<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The coordinate that specifies the east-west position of a point on the surface of the earth. |
887
+
888
+ ### GrailMetadata
889
+
890
+
891
+
892
+ Collects various bits of metadata information.
893
+
894
+ | Name | Type| Description|
895
+ |---|---|---|
896
+ |analysisTimeframe|[Timeframe](#timeframe)| |
897
+ |canonicalQuery|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The canonical form of the query. It has normalized spaces and canonical constructs. |
898
+ |dqlVersion|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The version of DQL that was used to process the query request. |
899
+ |executionTimeMilliseconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The time it took to execute the query. |
900
+ |locale|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Effective locale for the query. |
901
+ |notifications|Array&lt;[MetadataNotification](#metadatanotification)&gt;|Collected messages during the execution of the query. |
902
+ |query|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The submitted query. |
903
+ |queryId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The id of the query |
904
+ |sampled|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if sampling was used for at least one segment. |
905
+ |scannedBytes|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Number of scanned bytes during the query execution. |
906
+ |scannedDataPoints|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
907
+ |scannedRecords|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Number of scanned records during the query execution. |
908
+ |timezone|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Effective timezone for the query. |
909
+
910
+ ### Metadata
911
+
912
+
913
+
914
+ Collects various bits of metadata information.
915
+
916
+ | Name | Type|
917
+ |---|---|
918
+ |grail|[GrailMetadata](#grailmetadata)|
919
+ |metrics|Array&lt;[MetricMetadata](#metricmetadata)&gt;|
920
+
921
+ ### MetadataNotification
922
+
923
+
924
+
925
+ The message that provides additional information about the execution of the query.
926
+
927
+ | Name | Type| Description|
928
+ |---|---|---|
929
+ |arguments|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The arguments for the message format. |
930
+ |message|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The complete message of the notification. |
931
+ |messageFormat|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The message format of the notification, string.format based |
932
+ |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. |
933
+ |notificationType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The notification type, e.g. LIMIT_ADDED. |
934
+ |severity|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The severity of the notification, currently: INFO, WARN, ERROR. |
935
+ |syntaxPosition|[TokenPosition](#tokenposition)| |
936
+
937
+ ### MetricMetadata
938
+
939
+
940
+
941
+ An object that defines additional metric metadata.
942
+
943
+ | Name | Type| Description|
944
+ |---|---|---|
945
+ |description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The description of the metadata. |
946
+ |displayName|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The display name of the metadata. |
947
+ |fieldName|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the associated field used in the query. |
948
+ |metric.key|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The metric key. |
949
+ |rate|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The specified rate normalization parameter. |
950
+ |rollup|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Metadata about the rollup type. |
951
+ |shifted|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Indicates if the shifted parameter was used. |
952
+ |unit|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The unit used. |
953
+
954
+ ### ParseRequest
955
+
956
+
957
+
958
+
959
+
960
+ | Name | Type| Description|
961
+ |---|---|---|
962
+ |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'. |
963
+ |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
964
+ |queryOptions|[QueryOptions](#queryoptions)| |
965
+ |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' |
966
+
967
+ ### PositionInfo
968
+
969
+
970
+
971
+ The exact position in the query string.
972
+
973
+ | Name | Type| Description|
974
+ |---|---|---|
975
+ |column<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Query position column zero based index. |
976
+ |index<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Query position index. |
977
+ |line<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Query position line zero based index. |
978
+
979
+ ### QueryOptions
980
+
981
+
982
+
983
+ Query options.
984
+
985
+ ### QueryPollResponse
986
+
987
+
988
+
989
+ The response of GET query:execute call.
990
+
991
+ | Name | Type| Description|
992
+ |---|---|---|
993
+ |progress|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The progress of the query from 0 to 100. |
994
+ |result|[QueryResult](#queryresult)| |
995
+ |state<sup>*required</sup>|QueryState| |
996
+ |ttlSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Time to live in seconds. |
997
+
998
+ ### QueryResult
999
+
1000
+
1001
+
1002
+ The result of the DQL query.
1003
+
1004
+ | Name | Type| Description|
1005
+ |---|---|---|
1006
+ |metadata<sup>*required</sup>|[Metadata](#metadata)| |
1007
+ |records<sup>*required</sup>|Array&lt;null &#124; [ResultRecord](#resultrecord)&gt;|List of records containing the result fields data. |
1008
+ |types<sup>*required</sup>|Array&lt;[RangedFieldTypes](#rangedfieldtypes)&gt;|The data types for the result records. |
1009
+
1010
+ ### QueryStartResponse
1011
+
1012
+
1013
+
1014
+ The response when starting a query.
1015
+
1016
+ | Name | Type| Description|
1017
+ |---|---|---|
1018
+ |progress|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The progress of the query from 0 to 100. |
1019
+ |requestToken|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The token returned by the POST query:execute call. |
1020
+ |result|[QueryResult](#queryresult)| |
1021
+ |state<sup>*required</sup>|QueryState| |
1022
+ |ttlSeconds|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Time to live in seconds. |
1023
+
1024
+ ### RangedFieldTypes
1025
+
1026
+
1027
+
1028
+ The field type in range.
1029
+
1030
+ | Name | Type| Description|
1031
+ |---|---|---|
1032
+ |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). |
1033
+ |mappings<sup>*required</sup>|[RangedFieldTypesMappings](#rangedfieldtypesmappings)| |
1034
+
1035
+ ### RangedFieldTypesMappings
1036
+
1037
+
1038
+
1039
+ The mapping between the field name and data type.
1040
+
1041
+ ### ResultRecord
1042
+
1043
+
1044
+
1045
+ Single record that contains the result fields.
1046
+
1047
+ ### Timeframe
1048
+
1049
+
1050
+
1051
+ DQL data type timeframe.
1052
+
1053
+ | Name | Type| Description|
1054
+ |---|---|---|
1055
+ |end|Date|The end time of the timeframe. |
1056
+ |start|Date|The start time of the timeframe. |
1057
+
1058
+ ### TokenPosition
1059
+
1060
+
1061
+
1062
+ 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.
1063
+
1064
+ | Name | Type|
1065
+ |---|---|
1066
+ |end<sup>*required</sup>|[PositionInfo](#positioninfo)|
1067
+ |start<sup>*required</sup>|[PositionInfo](#positioninfo)|
1068
+
1069
+ ### VerifyRequest
1070
+
1071
+
1072
+
1073
+
1074
+
1075
+ | Name | Type| Description|
1076
+ |---|---|---|
1077
+ |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'. |
1078
+ |query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The full query string. |
1079
+ |queryOptions|[QueryOptions](#queryoptions)| |
1080
+ |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' |
1081
+
1082
+ ### VerifyResponse
1083
+
1084
+
1085
+
1086
+ Verify response.
1087
+
1088
+ | Name | Type| Description|
1089
+ |---|---|---|
1090
+ |notifications|Array&lt;[MetadataNotification](#metadatanotification)&gt;|The notifications related to the supplied DQL query string. |
1091
+ |valid<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|True if the supplied DQL query string is valid. |
1092
+
1093
+ ## Enums
1094
+
1095
+ ### DQLNodeNodeType
1096
+
1097
+ <div class="padding-left--md">
1098
+
1099
+ The type of the node.
1100
+
1101
+ #### Enum keys
1102
+
1103
+ <div class="padding-left--md">
1104
+
1105
+ `Alternative` | `Container` | `Terminal`
1106
+
1107
+ </div>
1108
+
1109
+
1110
+ </div>
1111
+
1112
+ ### FieldTypeType
1113
+
1114
+ <div class="padding-left--md">
1115
+
1116
+
1117
+
1118
+ #### Enum keys
1119
+
1120
+ <div class="padding-left--md">
1121
+
1122
+ `Array` | `Binary` | `Boolean` | `Double` | `Duration` | `GeoPoint` | `IpAddress` | `Long` | `Record` | `String` | `Timeframe` | `Timestamp` | `Uid` | `Undefined`
1123
+
1124
+ </div>
1125
+
1126
+
1127
+ </div>
1128
+
1129
+ ### QueryState
1130
+
1131
+ <div class="padding-left--md">
1132
+
1133
+ Possible state of the query.
1134
+
1135
+ #### Enum keys
1136
+
1137
+ <div class="padding-left--md">
1138
+
1139
+ `Cancelled` | `Failed` | `NotStarted` | `ResultGone` | `Running` | `Succeeded`
1140
+
1141
+ </div>
1142
+
1143
+
1144
+ </div>
1145
+
1146
+ ### TokenType
1147
+
1148
+ <div class="padding-left--md">
1149
+
1150
+ The type of the autocomplete token.
1151
+
1152
+ #### Enum keys
1153
+
1154
+ <div class="padding-left--md">
1155
+
1156
+ `Assignment` | `BooleanFalse` | `BooleanTrue` | `BraceClose` | `BraceOpen` | `BracketClose` | `BracketOpen` | `Colon` | `Comma` | `CommandName` | `DataObject` | `Dot` | `EndComment` | `EntityAttribute` | `EntitySelectorPart` | `EntityType` | `FieldModifier` | `FieldPattern` | `FunctionName` | `Indent` | `Linebreak` | `MetricKey` | `Null` | `Number` | `Operator` | `ParameterKey` | `ParameterValueScope` | `ParenthesisClose` | `ParenthesisOpen` | `ParsePattern` | `Pipe` | `Quote` | `SimpleIdentifier` | `SingleQuote` | `Slash` | `Space` | `String` | `TimeUnit` | `TimeseriesAggregation` | `TimeseriesAggregationExpression` | `TimestampValue` | `TraversalHopCount` | `TraversalOperator` | `TraversalRelationName` | `UidValue` | `Variable`
1157
+
1158
+ </div>
1159
+
1160
+
1161
+ </div>