• InfluxDB3.Client API
Show / Hide Table of Contents
  • InfluxDB3.Client
    • IInfluxDBClient
    • InfluxDBApiException
    • InfluxDBClient
  • InfluxDB3.Client.Config
    • ClientConfig
    • QueryOptions
    • WriteOptions
  • InfluxDB3.Client.Internal
    • TypeCasting
  • InfluxDB3.Client.Query
    • QueryType
  • InfluxDB3.Client.Write
    • PointData
    • PointDataValues
    • WritePrecision

Namespace InfluxDB3.Client.Config

Classes

ClientConfig

The ClientConfig class holds the configuration for the InfluxDB client.

You can configure following options:

If you want create client with custom options, you can use the following code:

using var client = new InfluxDBClient(new ClientConfig{
    Host = "https://us-east-1-1.aws.cloud2.influxdata.com",
    Token = "my-token",
    Organization = "my-org",
    Database = "my-database",
    AllowHttpRedirects = true,
    DisableServerCertificateValidation = true,
    WriteOptions = new WriteOptions
   {
       Precision = WritePrecision.S,
       GzipThreshold = 4096
   },
   QueryOptions = new QueryOptions
   {
       Deadline = DateTime.UtcNow.AddSeconds(10),
       MaxReceiveMessageSize = 4096,
       MaxSendMessageSize = 4096,
       CompressionProviders = new List<ICompressionProvider>
       {
           Grpc.Net.Compression.GzipCompressionProvider.Default
       }
   }
});

QueryOptions

Represents the options for configuring query behavior in the client.

WriteOptions

The WriteOptions class holds the configuration for writing data to InfluxDB.

You can configure following options:

  • Precision: The default precision to use for the timestamp of points if no precision is specified in the write API call.
  • GzipThreshold: The threshold in bytes for gzipping the body. The default value is 1000.

If you want create client with custom options, you can use the following code:

using var client = new InfluxDBClient(new ClientConfig
{
    Host = "https://us-east-1-1.aws.cloud2.influxdata.com",
    Token = "my-token",
    Organization = "my-org",
    Database = "my-database",
    WriteOptions = new WriteOptions
    {
        Precision = WritePrecision.S,
        GzipThreshold = 4096
    }
});
In this article
Back to top Generated by DocFX