Quick start
Create an admin token to authorize API requests.
curl -X POST "http://localhost:8181/api/v3/configure/token/admin"Check the status of the InfluxDB server.
curl "http://localhost:8181/health" \ --header "Authorization: Bearer ADMIN_TOKEN"Write data to InfluxDB.
curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto" --header "Authorization: Bearer ADMIN_TOKEN" \ --data-raw "home,room=Kitchen temp=72.0 home,room=Living\ room temp=71.5"If all data is written, the response is
204 No Content.Query data from InfluxDB.
curl -G "http://localhost:8181/api/v3/query_sql" \ --header "Authorization: Bearer ADMIN_TOKEN" \ --data-urlencode "db=sensors" \ --data-urlencode "q=SELECT * FROM home WHERE room='Living room'" \ --data-urlencode "format=jsonl"Output:
{"room":"Living room","temp":71.5,"time":"2025-02-25T20:19:34.984098"}
For more information about using InfluxDB 3 Core, see the Get started guide.