influxdb
InfluxDB client library for Haskell
https://github.com/maoe/influxdb-haskell
| Version on this page: | 1.9.2.2 | 
| LTS Haskell 24.18: | 1.9.3.2 | 
| Stackage Nightly 2025-07-14: | 1.9.3.2 | 
| Latest on Hackage: | 1.9.3.2 | 
influxdb-1.9.2.2@sha256:f8cf5f535347321ec0332184afa04c6fb68fe62094389cbfd8533df9960789b0,3592InfluxDB client library for Haskell
Currently this library is tested against InfluxDB 1.8. InfluxDB 2 isn’t supported (yet).
Getting started
There is a quick start guide on Hackage.
Running tests
Either cabal new-test or stack test runs the doctests in Haddock comments. Note that they need a local running InfluxDB server.
Contact information
Contributions and bug reports are welcome!
Please feel free to contact me through github or on gitter.
Changes
Revision history for influxdb
v1.9.2.2 - 2021-11-21
- Update dependencies
 
v1.9.2.1 - 2021-10-20
- Add support for aeson 2.0 (#89)
 
v1.9.2 - 2021-09-08
v1.9.1.2 - 2021-03-25
- Relax upper version bound for attoparsec
 
v1.9.1.1 - 2021-03-12
- Support GHC 9.0.1 (#85)
 
v1.9.1 - 2021-02-21
- Show error on the “impossible” path in writeByteString (#82)
 - Relax upper version bounds for lens, time, doctest, and bytestring
 - Switch from Travis CI to GitHub Actions (#84)
 
v1.9.0 - 2020-07-18
- Fix 
IgnoreandEmptyto replace theQueryResultsinstance forVoid. The instance has been deprecated. - Remove the deprecated 
parseResultsmethod inQueryResults. - Add the 
coerceDecodermethod inQueryResults. - Drop support for GHC 8.2 and older because of the use of 
EmptyDataDeriving. - Update doctest comments with 
TypeApplications. 
v1.8.0 - 2020-06-19
This release reworked the QueryResuls type class. There are some breaking changes:
parseResultshas been deprecated.QueryResultshas nowparseMeasurementmethod.Decoderhas been monomorphized so that it can be used with lens. The originalDecodertype has been renamed toSomeDecoder.QueryParamshas nowdecoderfield.parseResultsandparseResultsWithhad been usinglenientDecoderand it caused some unintuitive behavior (#64, #66). Now they usestrictDecoderinstead.parseErrorObjectnow doesn’t fail. It returns the error message of a response.parseQueryFieldwhich has been deprecated is now deleted.QueryResultsinstance forShowSerieswas broken. This is fixed.- The constructor of 
Decoder,parseResultsWith, andparseResultsWithDecoderhave been hidden from the top-level module. They’re still available fromDatabase.InfluxDB.JSON. 
See #68 for how to migrate your code from v1.7.x to v1.8.x.
v1.7.1.6 - 2020-06-03
- Relax upper version bound for doctest
 
v1.7.1.5 - 2020-05-27
- Relax upper version bound for http-client
 
v1.7.1.4 - 2020-05-27
- Relax upper version bound for aeson
 - Fix a GHC warning
 
v1.7.1.3 - 2020-04-03
- Relax upper version bound for base to support GHC 8.10.1
 
v1.7.1.2 - 2020-02-08
- Relax upper version bound for lens
 - Fix documentation bugs
 - Extend doctests
 - Test with GHC 8.8.2
 
v1.7.1.1 - 2019-09-09
- Relax upper version bound for lens
 
v1.7.1 - 2019-07-19
- Escape backslashes when encoding 
Lines (#75) 
v1.7.0 - 2019-05-03
- Support GHC 8.8.1-alpha1
- The types of 
getFieldandgetTaghave changed 
 - The types of 
 - Relax upper version bounds for clock and network
 
v1.6.1.3 - 2019-03-26
- Drop unused dependency on QuickCheck
 
v1.6.1.2 - 2019-01-21
- Relax upper version bound for network
 
v1.6.1.1 - 2019-01-10
- Relax upper version bound for http-client
 
v1.6.1 - 2018-11-20
- Add secureServer smart constructor for Server
 - Test with InfluxDB 1.7.1 and newer GHCs including 8.6.2
 - Enhace Haddock comments
 
v1.6.0.9 - 2018-09-11
- Relax upper version bound for network
 
v1.6.0.8 - 2018-09-04
- Relax upper version bound for QuickCheck
 
v1.6.0.7 - 2018-07-23
- Relax upper version bound for base to support GHC 8.6 (#69)
 
v1.6.0.6 - 2018-07-07
- Relax upper version bound for lens
 
v1.6.0.5 - 2018-06-25
- Relax upper version bound for doctest
 
v1.6.0.4 - 2018-06-18
- Relax upper version bound for containers
 
v1.6.0.3 - 2018-06-11
- Relax upper version bound for aeson
 
v1.6.0.2 - 2018-04-29
- Relax upper version bound for network
 
v1.6.0.1 - 2018-04-20
- Relax upper version bound for foldl
 
v1.6.0 - 2018-04-14
This release includes a few significant breaking changes.
- Deprecate the confusing parseQueryField and re-export parseJSON instead
 - Rewrite the QueryResults instances for tuples
 - Add Timestamp instance for TimeSpec (#59)
 - Extend haddock comments
 
v1.5.2 - 2018-04-11
- Export parseResultsWithDecoder, Decoder, lenientDecoder and strictDecoder from Database.InfluxDB
 - Extend haddock comments
 
v1.5.1 - 2018-03-29
- Add basic auth support for query (#58)
 
v1.5.0 - 2018-03-15
- Change UnexpectedResponse constructor to include the request and throw it in place of UserError in query/write/manage
 - Relax upper version bound for doctest
 - Extend Haddock comments in Database.InfluxDB.Line
 
The first item is a breaking change.
v1.4.0 - 2018-03-13
- Implement proper escaping/quoting for queries (#54)
 - Relax upper version bound for aeson
 - Test against InfluxDB 1.5
 
v1.3.0.1 - 2018-03-06
- Relax upper version bounds for doctest and QuickCheck
 
v1.3.0 - 2018-03-05
- Relax upper version bound for base (#51)
 - Implement proper escaping and quoting for special characters (#51, #52)
- Introduce the Measurement type and accompanying functions
 
 - Fix a bug in the HTTP writer where the precision parameter is ignored when constructing requests
 - Some minor doctest fixes
 
v1.2.2.3 - 2018-01-30
- Relax upper version bounds for http-types, lens and time
 
v1.2.2.2 - 2017-11-30
- Relax upper version bounds for http-types and tasty-hunit
 
v1.2.2.1 - 2017-11-30
- Relax upper version bound for http-types
 
v1.2.2 - 2017-06-26
- A couple of documentation fixes
 - Add 
Ordinstance forServer 
v1.2.1 - 2017-06-19
- Export 
formatDatabaseandformatKeyfromDatabase.InfluxDBfor convenience 
v1.2.0 - 2017-06-19
There are a lot of breaking changes in this release. The API has been cleaned up and a lot of Haddock comments are added extensively.
- The 
FieldValhas been renamed toFieldwhich takesNullabilityas a type parameter. localServerhas been renamed todefaultServer- Some constructors in 
InfluxExceptionhave been renamedBadRequesttoClientErrorIllformedJSONtoUnexpectedResponse
 - Added a smart constructor 
credentialsforCredentials - Dropped 
parseTimestampand addedparseUTCTime pinghandles timeout proerply and throwsInfluxExceptionon failurePingResulthas been renamed toPongand is now an abstract data type.PingParamshas been turned into an abstract data type.waitForLeaderhas been renamed totimeout.parsekeyhas been removed.getFieldandparseQueryFieldcan be used instead.- Drop support for 
http-client < 0.5 
v1.1.2.2 - 2017-05-31
- Relax upper version bound for foldl
 
v1.1.2.1 - 2017-05-02
- Relax version bounds for base and aeson
 
v1.1.2 - 2017-04-10
- Tighten lower version bound for base #43
 - Add 
Database.InfluxDB.Format.{string,byteString8} 
v1.1.1 - 2017-03-29
- Relax unnecessary Traversable constraints to Foldable
 
v1.1.0 - 2017-03-23
- Handle empty “values” in parseSeriesBody
 
v1.0.0 - 2017-03-03
The library was completely rewritten and support for older InfluxDB has been dropped.
- Support for InfluxDB 1.2
 
v0.10.0 - 2016-05-17
- Fix a typo in a Haddock comment (#28)
 - Drop support for retry < 0.7
 - Add stack.yml
 - Add support for GHC 8.0.1 (#29)
 
v0.9.1.3 - 2015-06-02
- Relax upper bound for aeson
 
v0.9.1.2 - 2015-05-15
- Relax upper bound for attoparsec
 
v0.9.1.1 - 2015-03-07
- Allow retry >= 0.6 && < 0.7
 
v0.9.1 - 2015-03-07
- Add 
writeSeriesData - Relax upper version bound for exceptions
 - Drop support for old retry package
- retry < 0.6 had an unexpected behavior wrt exception masking state (https://github.com/Soostone/retry/pull/12)
 
 
v0.9.0.1 - 2015-01-06
- Support for GHC 7.10.1
 
v0.9.0 - 2014-11-27
- The 
Valueparsers (accidentally) could throw exceptions. It’s fixed now. - Add 
fromSeriesData_which discards parsing errors and returns only successful data - Remove 
listInterfaces 
v0.8.0 - 2014-11-07
- Retry on connection failure and response timeout in addition to IOException
- Note that this may break existing code silently
 
 
v0.7.1.1 - 2014-09-19
- Relax upper bound for http-client
 - Set upper bounds for some packages
 
v0.7.1 - 2014-09-16
- Add more lenses
 
v0.7.0 - 2014-09-12
- Support for influxdb v0.8 (#15)
- Add shard spaces API
 - Add 
configureDatabase 
 - Add Typeable and Generic instances where missing
 - Remove unused 
ScheduledDeletetype 
v0.6.0 - 2014-08-19
- Support for retry-0.5 (#16)
newServerPoolWithRetrySettingshas been renamed tonewServerPoolWithRetryPolicyserverRetrySettingsfield inServerPoolhas been renamed toserverRetryPolicy
 - Support for network-uri (#17)
 
v0.5.1 - 2014-07-18
- Export 
InfluxExceptionfromDatabase.InfluxDB 
v0.5.0 - 2014-07-18
- Add 
InfluxExceptiontype and use it when decoding JSON or SeriesData (#12) - New API
pinglistInterfacesisInSync
 - BUGFIX: Fix 
when expecting a Float, encountered Int insteaderror (#14) 
v0.4.2 - 2014-06-06
- Export 
newServerPoolWithRetrySettingsfromDatabase.InfluxDB 
v0.4.1 - 2014-06-05
- Make retry settings configurable (#5)
 
v0.4.0 - 2014-06-05
- Remove 
databaseReplicationFactorfield fromDatabasetype 
v0.3.0.1 - 2014-06-04
- Allow exceptions-0.6 (@JohnLato)
 
v0.3.0 - 2014-06-03
- Support for InfluxDB v0.7
- Renamed 
usernamefield for/cluster_adminstouser - No support for the old field name
 
 - Renamed 
 
v0.2.2 - 2014-05-08
- Support for retry-0.4
 - Add deleteSeries
 - Add authenticateClusterAdmin and authenticateDatabaseUser
 
v0.2.1.1 - 2014-04-22
- Bug fix: Treat as integer if base10Exponent is positive
 
v0.2.1 - 2014-04-22
- Add 
stripPrefixSnake 
v0.2.0.1 - 2014-04-17
- Drop unnecessary dependency on 
scientificwhen using oldaeson. 
v0.2.0 - 2014-04-16
- Add more 
FromValueinstances - Add 
(.:?)and(.!=) - Add 
deriveSeriesDataand some variants - Add left folds for 
Streamtype 
v0.1.0.1 - 2014-04-07
- Support for older aeson
 - Textual paramters in some functions for convenience
 - A lot of bug fixes
 
v0.0.0 - 2014-04-03
- Initial release