Interface IInfluxDBClient
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public interface IInfluxDBClient : IDisposable
Methods
CreateService<TS>(Type)
Create a service for specified type.
Declaration
TS CreateService<TS>(Type serviceType)
where TS : IApiAccessor
Parameters
Type | Name | Description |
---|---|---|
Type | serviceType | type of service |
Returns
Type | Description |
---|---|
TS | new instance of service |
Type Parameters
Name | Description |
---|---|
TS | type of service |
DisableGzip()
Disable Gzip compress for http request body.
Declaration
IInfluxDBClient DisableGzip()
Returns
Type | Description |
---|---|
IInfluxDBClient | this |
EnableGzip()
Enable Gzip compress for http requests.
Currently only the "Write" and "Query" endpoints supports the Gzip compression.
Declaration
IInfluxDBClient EnableGzip()
Returns
Type | Description |
---|---|
IInfluxDBClient |
GetAuthorizationsApi()
Get the Authorization client.
Declaration
IAuthorizationsApi GetAuthorizationsApi()
Returns
Type | Description |
---|---|
IAuthorizationsApi | the new client instance for Authorization API |
GetBucketsApi()
Get the Bucket client.
Declaration
IBucketsApi GetBucketsApi()
Returns
Type | Description |
---|---|
IBucketsApi | the new client instance for Bucket API |
GetChecksApi()
Get the Check client.
Declaration
IChecksApi GetChecksApi()
Returns
Type | Description |
---|---|
IChecksApi | the new client instance for Checks API |
GetDeleteApi()
Get the Delete client.
Declaration
IDeleteApi GetDeleteApi()
Returns
Type | Description |
---|---|
IDeleteApi | the new client instance for Delete API |
GetInvokableScriptsApi(IDomainObjectMapper)
Create an InvokableScripts API instance.
Declaration
IInvokableScriptsApi GetInvokableScriptsApi(IDomainObjectMapper mapper = null)
Parameters
Type | Name | Description |
---|---|---|
IDomainObjectMapper | mapper | the mapper used for mapping invocation results to POCO |
Returns
Type | Description |
---|---|
IInvokableScriptsApi | New instance of InvokableScriptsApi. |
GetLabelsApi()
Get the Label client.
Declaration
ILabelsApi GetLabelsApi()
Returns
Type | Description |
---|---|
ILabelsApi | the new client instance for Label API |
GetLogLevel()
Set the LogLevel that is used for logging requests and responses.
Declaration
LogLevel GetLogLevel()
Returns
Type | Description |
---|---|
LogLevel | Log Level |
GetNotificationEndpointsApi()
Get the NotificationEndpoint client.
Declaration
INotificationEndpointsApi GetNotificationEndpointsApi()
Returns
Type | Description |
---|---|
INotificationEndpointsApi | the new client instance for NotificationEndpoint API |
GetNotificationRulesApi()
Get the NotificationRules client.
Declaration
INotificationRulesApi GetNotificationRulesApi()
Returns
Type | Description |
---|---|
INotificationRulesApi | the new client instance for NotificationRules API |
GetOrganizationsApi()
Get the Organization client.
Declaration
IOrganizationsApi GetOrganizationsApi()
Returns
Type | Description |
---|---|
IOrganizationsApi | the new client instance for Organization API |
GetQueryApi(IDomainObjectMapper)
Get the Query client.
Declaration
IQueryApi GetQueryApi(IDomainObjectMapper mapper = null)
Parameters
Type | Name | Description |
---|---|---|
IDomainObjectMapper | mapper | the mapper used for mapping FluxResults to POCO |
Returns
Type | Description |
---|---|
IQueryApi | the new client instance for the Query API |
GetQueryApiSync(IDomainObjectMapper)
Get the synchronous version of Query client.
Declaration
IQueryApiSync GetQueryApiSync(IDomainObjectMapper mapper = null)
Parameters
Type | Name | Description |
---|---|---|
IDomainObjectMapper | mapper | the mapper used for mapping FluxResults to POCO |
Returns
Type | Description |
---|---|
IQueryApiSync | the new synchronous client instance for the Query API |
GetScraperTargetsApi()
Get the ScraperTargetResponse client.
Declaration
IScraperTargetsApi GetScraperTargetsApi()
Returns
Type | Description |
---|---|
IScraperTargetsApi | the new client instance for Scraper API |
GetSourcesApi()
Get the Source client.
Declaration
ISourcesApi GetSourcesApi()
Returns
Type | Description |
---|---|
ISourcesApi | the new client instance for Source API |
GetTasksApi()
Get the TaskType client.
Declaration
ITasksApi GetTasksApi()
Returns
Type | Description |
---|---|
ITasksApi | the new client instance for Task API |
GetTelegrafsApi()
Get the Telegraf client.
Declaration
ITelegrafsApi GetTelegrafsApi()
Returns
Type | Description |
---|---|
ITelegrafsApi | the new client instance for Telegrafs API |
GetUsersApi()
Get the User client.
Declaration
IUsersApi GetUsersApi()
Returns
Type | Description |
---|---|
IUsersApi | the new client instance for User API |
GetWriteApi(IDomainObjectMapper)
Get the Write client.
Declaration
IWriteApi GetWriteApi(IDomainObjectMapper mapper = null)
Parameters
Type | Name | Description |
---|---|---|
IDomainObjectMapper | mapper | the mapper used for mapping to PointData |
Returns
Type | Description |
---|---|
IWriteApi | the new client instance for the Write API |
GetWriteApi(WriteOptions, IDomainObjectMapper)
Get the Write client.
Declaration
IWriteApi GetWriteApi(WriteOptions writeOptions, IDomainObjectMapper mapper = null)
Parameters
Type | Name | Description |
---|---|---|
WriteOptions | writeOptions | the configuration for a write client |
IDomainObjectMapper | mapper | the converter used for mapping to PointData |
Returns
Type | Description |
---|---|
IWriteApi | the new client instance for the Write API |
GetWriteApiAsync(IDomainObjectMapper)
Get the Write async client.
Declaration
IWriteApiAsync GetWriteApiAsync(IDomainObjectMapper mapper = null)
Parameters
Type | Name | Description |
---|---|---|
IDomainObjectMapper | mapper | the converter used for mapping to PointData |
Returns
Type | Description |
---|---|
IWriteApiAsync | the new client instance for the Write API Async without batching |
HealthAsync()
Get the health of an instance.
Declaration
Task<HealthCheck> HealthAsync()
Returns
Type | Description |
---|---|
Task<HealthCheck> | health of an instance |
IsGzipEnabled()
Returns whether Gzip compress for http request body is enabled.
Declaration
bool IsGzipEnabled()
Returns
Type | Description |
---|---|
System.Boolean | true if gzip is enabled. |
IsOnboardingAllowedAsync()
Check if database has default user, org, bucket created, returns true if not.
Declaration
Task<bool> IsOnboardingAllowedAsync()
Returns
Type | Description |
---|---|
Task<System.Boolean> | True if onboarding has already been completed otherwise false |
OnboardingAsync(OnboardingRequest)
Post onboarding request, to setup initial user, org and bucket.
Declaration
Task<OnboardingResponse> OnboardingAsync(OnboardingRequest onboarding)
Parameters
Type | Name | Description |
---|---|---|
OnboardingRequest | onboarding | to setup defaults |
Returns
Type | Description |
---|---|
Task<OnboardingResponse> | defaults for first run |
Exceptions
Type | Condition |
---|---|
HttpException | With status code 422 when an onboarding has already been completed |
PingAsync()
Check the status of InfluxDB Server.
Declaration
Task<bool> PingAsync()
Returns
Type | Description |
---|---|
Task<System.Boolean> | true if server is healthy otherwise return false |
ReadyAsync()
Check the readiness of InfluxDB Server at startup. It is not supported by InfluxDB Cloud.
Declaration
Task<Ready> ReadyAsync()
Returns
Type | Description |
---|---|
Task<Ready> | return null if the InfluxDB is not ready |
SetLogLevel(LogLevel)
Set the log level for the request and response information.
Declaration
void SetLogLevel(LogLevel logLevel)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel | the log level to set |
VersionAsync()
Return the version of the connected InfluxDB Server.
Declaration
Task<string> VersionAsync()
Returns
Type | Description |
---|---|
Task<System.String> | the version String, otherwise unknown |
Exceptions
Type | Condition |
---|---|
InfluxException | throws when request did not succesfully ends |