DQL Asynchronous Data Query¶
POST /api/v1/df/asynchronous/query_data
Overview¶
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| queries | array | Multi-command query, its content is a list of query objects Allow empty: False |
|
| fieldTagDescNeeded | boolean | Whether field or tag description information is needed Allow empty: False |
Parameter Supplementary Description¶
Query Description
- Parameter Description
| Parameter Name | type | Required | Description |
|---|---|---|---|
| queries | array | Y | Multi-command query, its content is a list of query objects |
| fieldTagDescNeeded | boolean | Whether field or tag description information is needed |
- queries[*] Member Parameter Structure Description
*** Note, the
async_idparameter has been added based on the "DQL Data Query" interface ***
| Parameter Name | type | Required | Description |
|---|---|---|---|
async_id |
string | N | Asynchronous query task ID, this value comes from the content.data[*].async_id in the previous dql query result; if this value existed in the previous query return result, then this query needs to include this value |
| 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.ignore_cache | boolean | Whether the query disables cache, default is false, meaning use cache | |
| query.promqlType | enum | Takes effect when qtype=promql, promql query type, optional values instantQuery and rangeQuery, default value is rangeQuery |
|
| query.highlight | boolean | Whether to display highlighted data | |
| query.timeRange | array | Timestamp list for time range | |
| query.disableMultipleField | bool | Whether to enable single-column mode, default is true |
|
| query.showLabel | bool | Whether to display object labels, default is none | |
| query.funcList | array | Re-aggregate to modify dql return value, note this parameter is invalid when disableMultipleField=False | |
| query.slimit | integer | Time series group size, only valid for metric queries | |
| query.soffset | integer | Time series group 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, sorderby's column is an expression, supports all aggregation 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 compatibility field | |
| query.sorder_by | array | Sorting list, structure is [{"column": "field", "order": "DESC"}], doris engine compatibility 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 response point count; if calculated point count is less than or equal to the point count when density=high, then it is valid, otherwise invalid | |
| query.search_after | array | Pagination query marker. The search_after value from the previous request's response result with the same parameters is used as this request's parameter. | |
| query.maxPointCount | integer | Maximum point count | |
| query.workspaceUUID | string | The uuid of the workspace to query, "*" means query all authorized workspaces, refer to interface /wksp_share/granted_ws_list for viewable workspaces | |
| query.workspaceUUIDs | array | The uuids of the workspaces to query, priority higher than query.workspaceUUID. ["*"] means query all authorized workspaces, refer to interface /wksp_share/granted_ws_list for viewable workspaces | |
| query.targetRegion | string | When specifying the query workspace as ["*"], this field is required | |
| query.output_format | string | lineprotocol: line protocol output, default if not filled, keeps the existing output format unchanged | |
| query.cursor_time | integer | Segmented query threshold: for 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 (returned by the engine as cursor_token value): during pagination query, the next_cursor_token returned from the last query needs to be set as this query's cursor_token; 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 point density parameters, maximum density
density[high]* maxPointCount > interval > density > control parameters in dql statement -
Common Query Descriptions
-
Unrecovered Event Query Note: When using openapi interface for data query, the default role is administrator. Note that data access rule restrictions may apply.