Skip to content

Get Time Series Chart



GET /api/v1/chart_image/get

Overview

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

Query Parameters

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

Additional Parameter Notes

Query Notes


Note, this interface is authenticated via clientToken. It will only take effect when the clientToken is valid. This interface does not require 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? ×