Skip to content

Get Time Series Trend Chart



GET /api/v1/chart_image/get

Overview

Retrieve a time series trend chart based on a specified DQL / PromQL query statement.

Query Request Parameters

Parameter Name Type Required Description
clientToken string Y Workspace clientToken
Example: wctn_xxx
Allow empty: False
qtype string Query statement type, defaults to dql
Allow empty: False
Optional values: ['dql', 'promql']
q string Y Query statement
Example:
Allow empty: False
startTime integer Y Start time point, timestamp in seconds
Example:
Allow empty: False
endTime integer Y End time point, timestamp in seconds
Example:
Allow empty: False
interval integer Data point interval, in seconds
Example:
Allow empty: False
tz string Timezone name, default value Asia/Shanghai
Example: Asia/Shanghai
Allow empty: False

Parameter Supplementary Explanation

Query Explanation


Note, this interface uses clientToken for authentication. It only takes effect when the clientToken is valid. This interface can be used without adding the request header DF-API-KEY.

Request Example

curl 'https://openapi.guance.com/api/v1/chart_image/get?clientToken=xxxxx&qtype=dql&q=M%3A%3A%60cpu%60%3A(avg(%60usage_idle%60))%20BY%20%60host%60&interval=60&startTime=1743391592&endTime=1743392492&tz=Asia%2FShanghai' \
--data ''

Response

# Response Content is Image Stream Data 

Feedback

Is this page helpful? ×