In influxdb I can query for special characters with: select * from "%" WHERE entity_id = 'air_quality_balcony' ORDER BY time DESC LIMIT 1;
But for curl this seems not working:
curl -k -G -u 'user:pwd 'https://url/query?pretty=true' --data-urlencode "db=home_assistant" --data-urlencode "q=select * from "%" WHERE entity_id = 'air_quality_balcony' ORDER BY time DESC LIMIT 1"
{
"error": "error parsing query: found %, expected identifier at line 1, char 15"
}
I think the escape key is \ so possibly something like
curl -k -G -u 'user:pwd ‘https://url/query?pretty=true’ --data-urlencode “db=home_assistant” --data-urlencode “q=select * from “\%\” WHERE entity_id = ‘air_quality_balcony’ ORDER BY time DESC LIMIT 1”
curl -k -G -u 'http://localhost:8086/query?pretty=true' --data-urlencode "db=home_assistant" --data-urlencode "q=select * from \"%\" WHERE \"entity_id\" = 'air_quality_balcony' ORDER BY time DESC LIMIT 1"