Hi All,
We are trying to query datasource via api. Following the documentation -
Getting below error :
{
“results”: {
“A”: {
“error”: “bad_data: 1:1: parse error: no expression found in input”,
“status”: 500,
“frames”:
}
}
}
Curl command below -
curl --location --request POST ‘https:///api/ds/query’
–header ‘Content-Type: application/json’
–header ‘Accept: application/json’
–header ‘Authorization: Bearer <>’
–data-raw ‘{
“from”:“now-5m”,
“to”:“now”,
“queries”:[
{
“refId”:“A”,
“query”:“count(kube_namespace)”,
“datasource”:{
“uid”:“PBFA97CFB590B2093”
}
}
]
}’
Grafana version - 9.5.3
Datasource: Prometheus