influxdata / influxdata/influxdb

Add option to write data to a bucket from Curl

Open
#19,206 1 comment 0 reactions 0 assignees View on GitHub
area/2.x epic kind/enhancement team/ui
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

![image](https://user-images.githubusercontent.com/4805997/89319704-566fce00-d635-11ea-9663-9d025231635c.png)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.