# Use api put data to influx.it overwrite

**URL:** <https://community.influxdata.com/t/use-api-put-data-to-influx-it-overwrite/19552>\
**Category:** Systems\
**Tags:** influxdb\
**Created:** [April 23, 2021, 7:38am UTC](https://community.influxdata.com/t/use-api-put-data-to-influx-it-overwrite/19552 "2021-04-23T07:38:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atech](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/atech/32/5888_2.png) [@Atech](https://community.influxdata.com/u/Atech)\
**Post date:** [April 23, 2021, 7:38am UTC](https://community.influxdata.com/t/use-api-put-data-to-influx-it-overwrite/19552/1 "2021-04-23T07:38:50Z")

</div>

Hi .  
I want to monitor filesystem on server. And collect data format write to file. total 20 row .

Filesystem,Host=Host123 Device=“/dev”,Mount\_point=“/dev”,Percent\_use=“0” 1619160999000000000

And insert data to influxdb with API.  
curl -s -i -XPOST ‘[http://serverinfluxdb:8086/write?db=mydb](http://serverinfluxdb:8086/write?db=mydb)’ --header ‘Authorization: Token admin:admin’ --data-binary @infodata.txt

But i check in database “mydb” use measure “Filesystem” by command select \* from Filesystem;

It show output 1 row .

what happen.

Please help.  
Thank you.

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [April 23, 2021, 3:51pm UTC](https://community.influxdata.com/t/use-api-put-data-to-influx-it-overwrite/19552/2 "2021-04-23T15:51:26Z")

</div>

Hello @Atech,  
Does your data have different timestamps? Are you trying to write data to 2.x or 1.x? It looks like you’re trying to write data to 1.x with the 2.0 api. If you’re trying to write data to 1.x, why not just use the 1.x api?

```auto
curl -i -XPOST 'http://example.com:8080/write?db=mydb' --data-binary @cpu_data.txt

```

---

<div class="post-metadata">

**Author:** ![Atech](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/atech/32/5888_2.png) [@Atech](https://community.influxdata.com/u/Atech)\
**Post date:** [June 27, 2022, 8:08am UTC](https://community.influxdata.com/t/use-api-put-data-to-influx-it-overwrite/19552/3 "2022-06-27T08:08:40Z")

</div>

Thank you .  
i retry it .  
it work.
