DQL Data Query¶
POST /api/v1/df/{workspace_uuid}/query_data
Overview¶
Route Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
workspace_uuid | string | Y | The uuid of the workspace for the query |
Body Request Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
sceneUUID | string | Scene UUID Allow empty: False |
|
dashboardUUID | string | View UUID Allow empty: False |
|
testTimeout | float | Timeout time for creating ban operations (valid in debug mode) Allow empty: False |
|
queries | array | Multi-command queries, whose content is a list composed of query objects Allow empty: False |
|
fieldTagDescNeeded | boolean | Whether field or tag description information is needed Allow empty: False |
|
expensiveQueryCheck | boolean | Whether to check wildcard left * situations Allow empty: False |
|
dataQueryPreview | json | Data access preview feature Allow empty: False |
|
dataQueryPreview.maskFields | string | Desensitization fields, multiple fields separated by commas Example: message,host Allow empty: False Allow empty string: True |
|
dataQueryPreview.reExprs | array | Regular expressions Example: [{'name': 'jjj', 'reExpr': 'ss', 'enable': 0}, {'name': 'lll', 'reExpr': 'ss', 'enable': 1}] Allow empty: False |
Additional Parameter Notes¶
Query Description
- Field descriptions for elements in the queries array
Parameter Name | Type | Required | Description |
---|---|---|---|
sceneUUID | string | Y | Scene UUID |
dashboardUUID | string | Y | View UUID |
queries[*] | string | Y | Query list |
-
DQL JSON structure parameter description (queries[*] element)
-
Basic Fields *
Parameter Name | Type | Required | Description |
---|---|---|---|
qtype | string | Y | Query statement type dql: Indicates a dql type query statement; promql: Indicates PromQl type query statement |
query | json | Y | Query structure |
query.q | string | Query statement consistent with qtype type, such as dql or promql query statement | |
query.promqlType | enum | Effective when qtype=promql, promql query type, optional values instantQuery andrangeQuery , default value is rangeQuery |
|
query.highlight | boolean | Whether to display highlighted data | |
query.timeRange | array | List of timestamps for time range | |
query.disableMultipleField | bool | Whether to enable single-column mode, default is true |
|
query.showLabel | bool | Whether to display object's labels, default none | |
query.funcList | array | Re-aggregates the returned values of dql, note that this parameter is invalid when disableMultipleField=False | |
query.slimit | integer | Time series grouping size, only effective for metrics queries | |
query.soffset | integer | Time series grouping offset | |
query.limit | integer | Pagination size | |
query.offset | integer | Pagination offset | |
query.orderby | array | Sorting list, {fieldName:method} , note that sorting for measurement queries only supports fieldName=time; method in ["desc", "asc"]; note that sorting for measurement queries only supports fieldName=time |
|
query.sorderby | array | Sorting list, sorderby columns are expressions, support all aggregation functions returning single values min max last avg p90 p95 count, {fieldName:method} , structure consistent with orderby |
|
query.order_by | array | Sorting list, structure [{"column": "field", "order": "DESC"}] , Doris engine compatible field |
|
query.sorder_by | array | Sorting list, structure [{"column": "field", "order": "DESC"}] , Doris engine compatible field |
|
query.density | string | Point density of the response, priority less than autoDensity and greater than density set in the dql statement | |
query.interval | integer | Unit is seconds, time slice interval used to calculate the number of response points; if the calculated number of points is less than or equal to the number of points when density=high, it is valid, otherwise it is invalid | |
query.search_after | array | Pagination marker, returned by the current interface pagination marker, used for input on the next request | |
query.maxPointCount | integer | Maximum number of points | |
query.workspaceUUID | string | UUID of the workspace to be queried | |
query.output_format | string | lineprotocol: Line protocol output, if not specified, the existing output format remains unchanged by default | |
query.cursor_time | integer | Segment query threshold: When performing the first segment query, cursor_time needs to be set to end_time; for subsequent segment queries, cursor_time needs to be set to the next_cursor_time in the response | |
query.cursor_token | string | Pagination query token (value of cursor_token returned by the guance select engine): During pagination queries, the next_cursor_token returned from the previous query should be set as the cursor_token for the current query; requests without cursor_token may cause data with the same timestamp to be skipped during pagination. | |
query.disable_sampling | bool | Sampling disable switch, default value is false |
- Response point density
density
parameter value description *
Optional Value | Description |
---|---|
lower | Lower, 60 points |
low | Low, 180 points |
medium | Medium, 360 points |
high | High, 720 points |
-
Note the priority of the point density parameter, maximum density
density[high]
maxPointCount > interval > density > control parameters in the dql statement -
Common Query Descriptions