I’m new to all things influx, and have searched for similar posts, but have found none.
I am trying to create a curl query for my cloud influxdb bucket. When I go to my influxdb account, the url europe-west1-1.gcp.cloud2.influxdata.com shows up, so I assemble a curl command that starts with:
curl -G ‘http://europe-west1-1.gcp.cloud2.influxdata.com/api/v2 …’
but I get back:
308 Permanent Redirect
Looking up the 308 error seems to indicate I'm using the wrong URL - how do I determine what the right URL would be? Thanks.
I was able to get all logged data for the last hour on v2 cloud using the following curl based query (from a cygwin prompt in my case):
curl --request POST
–header ‘Authorization: Token MY_TOKEN’
–header ‘Accept: application/csv’
–header ‘Content-type: application/vnd.flux’
–data ‘from(bucket: “MY_BUCKET”)
|> range(start: -1h)’
this might be helpful
Basically you have to:
- install the cli locally
- create a cli configuration with your cloud account credentials
influx config create | InfluxDB Cloud Documentation
- ta-da now you can use the cli to access your cloud account.