Skip to content

DQL Data Asynchronous 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

Additional Parameter Notes

Query Description


The content.data[i].warnings[] in the final response of an asynchronous query may contain DQLDataAccessScopeRestricted. details[0].metadata.namespace is fixed to logging in the current release; restriction=partial means only data from authorized indices is returned, restriction=all means no related log index is authorized and an empty result is returned. HTTP status codes and request parameters remain unchanged.

  1. 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
  1. Structure of queries[*] Member Parameters *** Note: the async_id parameter is added on top of 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 exists in the previous query result, it must be included in the current query
qtype string Y Type of query statement
dql: indicates a DQL type query statement;
promql: indicates a PromQL type query statement
query json Y Query structure
query.q string Query statement consistent with the qtype, e.g., a DQL or PromQL query statement
query.ignore_cache boolean Whether to disable cache for the query, default is false (cache enabled)
query.promqlType enum Effective when qtype=promql, the query type for PromQL, optional values: instantQuery and rangeQuery, default 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 is none
query.funcList array Re-aggregation modifiers for DQL return values; note that 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 Page size
query.offset integer Page offset
query.orderby array Sort list, {fieldName:method}; note that for metric queries, sorting only supports fieldName=time; method in ["desc", "asc"]
query.sorderby array Sort list, the column of sorderby is an expression supporting all aggregation functions that return a single value: min, max, last, avg, p90, p95, count, {fieldName:method}, structure same as orderby
query.order_by array Sort list, structure is [{"column": "field", "order": "DESC"}], compatible with Doris engine
query.sorder_by array Sort list, structure is [{"column": "field", "order": "DESC"}], compatible with Doris engine
query.density string Response point density, priority lower than autoDensity and higher than the density set in the DQL statement
query.interval number Time slice interval, only accepts positive integers that can be converted to Kodo int64 range and not less than 1ms; default unit is seconds, can be specified as milliseconds via interval_unit
query.interval_unit string Unit of interval, optional s (seconds) or ms (milliseconds), default is s
query.search_after array Pagination query marker. The search_after value from the previous response with the same parameters is used as the parameter for the current request.
query.maxPointCount integer Maximum number of points
query.workspaceUUID string UUID of the workspace to query, "*" means query all authorized workspaces; see workspace reference endpoint /wksp_share/granted_ws_list
query.workspaceUUIDs array UUIDs of the workspaces to query, priority higher than query.workspaceUUID. ["*"] means query all authorized workspaces; see workspace reference endpoint /wksp_share/granted_ws_list
query.targetRegion string Required when the query workspace is set to ["*"]
query.output_format string lineprotocol: output in line protocol format; if not specified, the current output format is retained
query.cursor_time integer Segmented query threshold: for the first segmented query, set cursor_time to end_time; for subsequent segmented queries, set cursor_time to the next_cursor_time from the response
query.cursor_token string Pagination query token (the cursor_token value returned by the engine): for pagination queries, set the next_cursor_token from the previous query as the cursor_token for the current query; requests without a cursor_token may cause data with the same timestamp to be skipped during pagination
query.disable_sampling bool Sampling disable switch, default is false
query.disable_truncate bool Whether to truncate the returned content, default is none
  1. Response Point Density density Parameter Values
Option Description
lower Lower, 60 points
low Low, 180 points
medium Medium, 360 points
high High, 720 points
  • Note the priority of the density parameter: maxPointCount > interval > density > control parameters in the DQL statement

  • Common Query Examples

  • Unrecovered Event Query

Note: When querying data via the OpenAPI interface, the default role is Administrator. Be aware that data access rule restrictions may apply.

Response


Feedback

Is this page helpful?