Quick start

  1. Create an admin token to authorize API requests.

    curl -X POST "http://localhost:8181/api/v3/configure/token/admin"
  2. Check the status of the InfluxDB server.

    curl "http://localhost:8181/health" \
       --header "Authorization: Bearer ADMIN_TOKEN"
  3. 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.

  4. 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.