Exporting csv from openhabian for Pi

Hello,
Has anyone tried to export a data from certain periods in time for data going into the influxDB? Like with this command?

curl “http://hosta:8086/db/dbname/series?u=root&p=root&q=select%20*%20from%20series_name%3B” > series_name.json

I’ve never used Openhabian before. Just wondering if something like this would work. Thanks!