Trying to query with curl

I’m trying to test the API-access to my influx cloud 2.0 data. I still cannot get the simple curl test to work. The curl is as follows (org and token not real)

curl “” -H “Authorization: Token JrV4yH0BxxxxxxxxxxxxxxxxxB8wA==” -H “Accept: application/csv” -H “Content-type: application/vnd.flux” -d “range(start: -12h)|> filter(fn: ® => r.device == ‘AutotalliTemp’)”

I guess there is some simple misunderstanding here but what it might be?



That isn’t valid Flux, you’ll need from(bucket: "sensors") |>

So your curl would look like:

curl "" \
  -H "Authorization: Token JrV4yH0BxxxxxxxxxxxxxxxxxB8wA==" \
  -H "Accept: application/csv" \
  -H "Content-type: application/vnd.flux" \
  -d 'from(bucket: "sensors") |> range(start: -12h) |> filter(fn: (r) => r.device == "AutotalliTemp")'

Thanks. That seems to work, I initially got another error but that was simply question of wrong kind of quote character.