Path not found error for influx db query api URL

Hii everyone,

I am Parth Suhagiya. I want to read data value from database through query api url. I can successfully read value from python but now i want to read from url. Because than i will use this url to read value through LabVIEW. I tried with url as follow:

The script for this path is as follows:
from(bucket: “Raw”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “611_PowerEl_PV1AC”)
|> filter(fn: (r) => r[“_field”] == “Value”)
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: “mean”)

And the above url gives me error not found with the message path not found.
can anybody help me to solve this and create a proper url to read data.

Any help will be appreciated. Thank you for your time and help.

Hello @parthsuhagiya,
I can recommend the following resources:

Your cURL request would look like:

curl --request POST \
  http://localhost:8086/api/v2/query?orgID=INFLUX_ORG_ID  \
  --header 'Authorization: Token INFLUX_TOKEN' \
  --header 'Accept: application/csv' \
  --header 'Content-type: application/vnd.flux' \
  --data 'from(bucket:"example-bucket")
        |> range(start: -12h)
        |> filter(fn: (r) => r._measurement == "example-measurement")
        |> aggregateWindow(every: 1h, fn: mean)'
1 Like

Thanks @Anaisdg , Yes this message with the curl command worked for me. I have mistaken in command earlier. I refer to your curl command and now it works.