influxdata / influxdata/influxdb
Add option to write data to a bucket from Curl
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
There should be an option to write data via the API using curl.
Clicking that option should take the user to a page with examples and their information already filled in, similar to https://v2.docs.influxdata.com/v2.0/write-data/developer-tools/api/#example-api-write-request

Provide user with bucket and token selection first, followed by prefilled copy-able snippet below:
```
curl --request POST \
"http://localhost:8086/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET&precision=ns" \
--header "Authorization: Token YOUR_API_TOKEN" \
--header "Content-Type: text/plain; charset=utf-8" \
--header "Accept: application/json" \
--data-binary '
airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000
airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
'
```
Contributor guide
Research direction
Start by locating the existing UI entry point for writing data and the API write-request examples referenced in the issue. Implement the bucket and token selectors with a page that shows a prefilled, copyable curl snippet; done means the option navigates there and the selected values appear in the request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100