APPID + Token to authenticate the access.APPID can be obtained here.Token can be obtained from the basic information of the corresponding TMP instance.GET /api/v1/queryPOST /api/v1/query
-query.timeout parameter by default.curl -u "appid:token" 'http://IP:PORT/api/v1/query?query=up'
< HTTP/1.1 401 Unauthorized< Content-Length: 0
GET /api/v1/query_rangePOST /api/v1/query_range
/api/v1/query_range API as shown below:$ curl -u "appid:token" 'http://IP:PORT/api/v1/query_range?query=up&start=2015-07-01T20:10:30.781Z&end=2015-07-01T20:11:00.781Z&step=15s'{"status" : "success","data" : {"resultType" : "matrix","result" : [{"metric" : {"__name__" : "up","job" : "prometheus","instance" : "localhost:9090"},"values" : [[ 1435781430.781, "1" ],[ 1435781445.781, "1" ],[ 1435781460.781, "1" ]]},{"metric" : {"__name__" : "up","job" : "node","instance" : "localhost:9091"},"values" : [[ 1435781430.781, "0" ],[ 1435781445.781, "0" ],[ 1435781460.781, "1" ]]}]}}
BasicAuth authentication method and enter the corresponding authentication information as shown below:
Feedback