Skip to content

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 Dashboard UUID
Allow empty: False
testTimeout float Timeout for ban operation (effective in debug mode)
Allow empty: False
queries array Multiple command queries, 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 Data access preview function
Allow empty: False
dataQueryPreview.maskFields string Masked 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 Instructions

Query Instructions


  1. queries Array Element Field Description
Parameter Name type Required Description
sceneUUID string Y Scene UUID
dashboardUUID string Y Dashboard UUID
queries[*] string Y Query List
  1. DQL JSON Structure Parameter Description (queries[*] Element)

  2. Basic Fields *

Parameter Name Type Required Description
qtype string Y Query statement type
dql: Indicates dql type query statement;
promql: Indicates PromQl type query statement
query json Y Query structure
query.q string Query statement consistent with qtype, e.g., dql or promql query statement
query.promqlType enum Effective 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 of 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 invalid when disableMultipleField=Flse
query.slimit integer Time series group size, only effective for metric queries
query.soffset integer Time series group offset
query.limit integer Page size
query.offset integer Page offset
query.orderby array Sorting list, {fieldName:method} , note sorting for metric set queries only supports fieldName=time; method in ["desc", "asc"]; note sorting for metric set queries only supports fieldName=time
query.sorderby array Sorting list, sorderby column is an expression, supports all aggregation functions returning single value min max last avg p90 p95 count, {fieldName:method}, structure same as 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 response points; calculated points less than or equal to density=high points, then valid, otherwise invalid
query.search_after array Pagination mark, returned by current interface, used for next request
query.maxPointCount integer Maximum point count
query.workspaceUUID string UUID of the workspace to query
query.output_format string lineprotocol: Line protocol output, default if not filled, default output format remains unchanged
query.cursor_time integer Segment query threshold: For the first segment query, cursor_time needs to be set to end_time; for subsequent segment queries, cursor_time needs to be set to next_cursor_time in the response
query.cursor_token string Pagination query token (returned by engine cursor_token value): For pagination queries, 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 density Parameter Value Description *
Optional Value Description
lower Lower, 60 points
low Low, 180 points
medium Medium, 360 points
high Low, 720 points
  • Note the priority of point density parameters, maximum density density[high] * maxPointCount > interval > density > control parameters in dql statement

  • Common Query Instructions

  • Unrecovered Event Query

Response