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 to 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 for the ban operation (effective in debug mode) Allow empty: False |
|
| queries | array | Multi-command query, whose content is a list of query objects Allow empty: False |
|
| fieldTagDescNeeded | boolean | Whether field or tag description information is needed Allow empty: False |
|
| expensiveQueryCheck | boolean | Whether to check for wildcard left * cases Allow empty: False |
|
| dataQueryPreview | json | Preview function for data access 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 |
Parameter Supplementary Description¶
Query Description
- Field description of queries array elements
| 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[*] elements)
-
Basic Fields *
| Parameter Name | type | Required | Description |
|---|---|---|---|
| qtype | string | Y | Type of query statement dql: indicates DQL type query statement; promql: indicates PromQL type query statement |
| query | json | Y | Query structure |
| query.q | string | Query statement consistent with the qtype type, e.g., DQL or PromQL query statement | |
| query.promqlType | enum | Effective when qtype=promql, the query type of PromQL, optional values instantQuery and rangeQuery, default value is rangeQuery |
|
| query.highlight | boolean | Whether to display highlighted data | |
| query.timeRange | array | Timestamp list for the time range | |
| query.disableMultipleField | bool | Whether to enable single-column mode, default is true |
|
| query.showLabel | bool | Whether to display object labels, default none | |
| query.funcList | array | Re-aggregation to modify DQL return values, note: invalid when disableMultipleField=False | |
| query.slimit | integer | Time series grouping size, only effective for metric 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: sorting for measurement queries only supports fieldName=time; method in ["desc", "asc"]; note: sorting for measurement queries only supports fieldName=time |
|
| query.sorderby | array | Sorting list, the column of sorderby is an expression, supports all aggregate functions returning a single value min max last avg p90 p95 count, {fieldName:method}, structure consistent with orderby |
|
| query.order_by | array | Sorting list, structure is [{"column": "field", "order": "DESC"}], Doris engine compatible field | |
| query.sorder_by | array | Sorting list, structure is [{"column": "field", "order": "DESC"}], Doris engine compatible field | |
| query.density | string | Response point density, priority lower than autoDensity and higher than density set in 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 effective, otherwise invalid | |
| query.search_after | array | Pagination marker, returned by the current interface, used for the next request | |
| query.maxPointCount | integer | Maximum number of points | |
| query.workspaceUUID | string | The uuid of the workspace to query | |
| query.output_format | string | lineprotocol: Line protocol output, if not filled, the default output format remains unchanged | |
| query.cursor_time | integer | Threshold for segmented query: during the first segmented query, cursor_time needs to be set to end_time; for subsequent segmented 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 engine): during pagination query, the next_cursor_token returned from the last query needs to be set as the cursor_token for this 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
densityparameter 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