tobiasschuerg / InfluxDB-Client-for-Arduino

Simple library for sending measurements to an InfluxDB with a single network request. Supports ESP8266 and ESP32.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Create Organisation (influxDB v2)

CoolZeroNL opened this issue · comments

Proposal:
Create (delete?, find ?) organisation the same way now buckets can be created.

Current behavior:
not supported

Desired behavior:
able to create a organisation if it not exist, the same way now buckets can be created it it does not exist yet.

offcource the API token needs to have the scope: --write-orgs | Grant permission to create and update organizations

API docs: https://docs.influxdata.com/influxdb/v2/api/#operation/PostOrgs

Scope docs: https://docs.influxdata.com/influxdb/cloud/reference/cli/influx/auth/create/

Alternatives considered:
setting up now my own http client to do the api call. it would be nice to use it out of the box with the client.

Use case:
I dont want manual create a new organisations. i want to to isolate the data by organsation (endusers can only see org level). So I want to set the org, bucket, token through the ESP, if the organisation and/or bucket doesnt exist it creates them.

In my case, then a cron script will keep track on the server side for each (new) organisation + buckers, it will map/created these also in grafana. This so the endusers are isolated from each other data.

You can create a PR and we can discuss details in it.