Using params infinite datasource

I want to use RESTAPI’s to receive data. I use the infinity plugin. I can configure the URL, however need to configure some payload, is this possible by Ifinity?

example JSON code to use:

url = “https://eu-cloud***********************/network_test_profiles”

payload={
“location_id”: '6204’
“sensor_id”: '620
*
}

headers = {
‘api_key’: ‘***********************************************’,
#‘Content-Type’: ‘application/json’
}

response = requests.request(“POST”, url, headers=headers, data=payload)

Thx!

Welcome

Check this thread out.

Check the url options in query editor which allow you to send payload via post body. And also you will have options to configure headers.

Configure api key via datasource configuration for security reasons.

Hi Yesoreyeram
Thx for the reply. I’m total new to Grafana and working with datasets. I already had used the API key at the data source level. I read your advice and configured the body section as this:

, however still an error. The Curl command looks like this:

The error is about Timeout exceeded. Any idea?
Thx!

It appears you pasted invalid json in the body. Try valid json such as

{
  "location_id": "6204",
  "sensor_id": "620*"
}