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:
http://:8086/api/v2/read?org=sems&bucket=Raw&query=from(bucket:%22Raw%22)%20%7C%3E%20range(start:%20-100m)%20%7C%3E%20filter(fn:%20(r)%20=%3E%20r[%22_measurement%22]%20==%20%22611_PowerEl_PV1AC%22)%20%7C%3E%20filter(fn:%20(r)%20=%3E%20r[%22_field%22]%20==%20%22Value%22)&authToken=&auth=:

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.