Quick start

Authenticate, write, and query with the API:

  1. Check the status of your InfluxDB 3 Cloud instance.

    curl "https://cluster-host.a.influxdb.io/health" \
       --header "Authorization: Bearer AUTH_TOKEN"
  2. Write data to a database.

    curl "https://cluster-host.a.influxdb.io/api/v3/write_lp?db=sensors&precision=auto" \
      --header "Authorization: Bearer AUTH_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.

  3. Query data from a database.

    curl -G "https://cluster-host.a.influxdb.io/api/v3/query_sql" \
      --header "Authorization: Bearer AUTH_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, see the Get started guide.


Was this page helpful?

Thank you for your feedback!