This page documents an earlier version of InfluxDB.
InfluxDB v2.6 is the latest stable version.
Percentages can be calculated using basic math operators available in InfluxQL. This guide walks through use-cases and examples of calculating percentages from two values in a single query.
InfluxDB can handle hundreds of thousands of data points per second. Working with that much data over a long period of time can create storage concerns. A natural solution is to downsample the data; keep the high precision raw data for only a limited time, and store the lower precision, summarized data for much longer or forever.
InfluxDB offers two features - Continuous Queries (CQ) and Retention Policies (RP) - that automate the process of downsampling data and expiring old data.
Querying data with the HTTP API The HTTP API is the primary means for querying data in InfluxDB (see the command line interface and client libraries for alternative ways to query the database).
To perform a query send a GET request to the /query endpoint, set the URL parameter db as the target database, and set the URL parameter q as your query. You may also use a POST request by sending the same parameters either as URL parameters or as part of the body with application/x-www-form-urlencoded.
There are many ways to write data into InfluxDB including the command line interface, client libraries and plugins for common data formats such as Graphite. Here we’ll show you how to create a database and write data to it using the built-in HTTP API.
Creating a database using the HTTP API To create a database send a POST request to the /query endpoint and set the URL parameter q to CREATE DATABASE <new_database_name>.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community!
We welcome and encourage your feedback and bug reports for InfluxDB and this documentation.
To find support, use the following resources:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.