Trying to read influxdb data with API and curl

Hello
I am trying for the first time to retrieve data via the API and I encounter a socui that I can’t solve. The influxdb I have to connect to is in version 1.8.

here is the command I give :

curl -i -k -XPOST ‘https://{SERVER_URL}/query’ --header 'Authorization: Token {USERNAME}:{PASSWORD}' --header "Content-Type: text/plain; charset=utf-8" --header "Accept: application/json" --data-urlencode "q=SELECT * FROM iot.cpu_load_short"

and what curl answers

curl: (3) Failed to convert ‘https to ACE; string contains a disallowed character

would you have any idea of the source of the problem?

Have a nice day
Thierry

Since curl is already complaing: It looks to me at first glance like you used the wrong quotation marks for the url?

OMG ! what a jerk I am !
I was only looking for my error in the request, not in the URL parameter

Thanks a lot to you @Franky1 !!!

After changing quotation marks :

HTTP/1.1 200 OK
Content-Type: application/json
Request-Id: c6fe3d56-a445-11ec-b437-fa163ef07e14
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.8.10
X-Request-Id: c6fe3d56-a445-11ec-b437-fa163ef07e14
Date: Tue, 15 Mar 2022 09:53:33 GMT
Transfer-Encoding: chunked

{"results":[{"statement_id":0,"series":[{"name":"cpu_load_short","columns":["time","host","region","value"],"values":[["2015-06-11T20:46:02Z","server01","us-west",0.64],["2022-03-15T08:08:59.247777028Z","server01","us-west",0.65]]}]}]}