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 |
---|---|
IInflux |
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 |
---|---|
IInflux |
GetAuthorizationsApi()
Get the Authorization client.
Declaration
IAuthorizationsApi GetAuthorizationsApi()
Returns
Type | Description |
---|---|
IAuthorizations |
the new client instance for Authorization API |
GetBucketsApi()
Get the Bucket client.
Declaration
IBucketsApi GetBucketsApi()
Returns
Type | Description |
---|---|
IBuckets |
the new client instance for Bucket API |
GetChecksApi()
Get the Check client.
Declaration
IChecksApi GetChecksApi()
Returns
Type | Description |
---|---|
IChecks |
the new client instance for Checks API |
GetDeleteApi()
Get the Delete client.
Declaration
IDeleteApi GetDeleteApi()
Returns
Type | Description |
---|---|
IDelete |
the new client instance for Delete API |
GetInvokableScriptsApi(IDomainObjectMapper)
Create an InvokableScripts API instance.
Declaration
IInvokableScriptsApi GetInvokableScriptsApi(IDomainObjectMapper mapper = null)
Parameters
Type | Name | Description |
---|---|---|
IDomain |
mapper | the mapper used for mapping invocation results to POCO |
Returns
Type | Description |
---|---|
IInvokable |
New instance of InvokableScriptsApi. |
GetLabelsApi()
Get the Label client.
Declaration
ILabelsApi GetLabelsApi()
Returns
Type | Description |
---|---|
ILabels |
the new client instance for Label API |
GetLogLevel()
Set the Log
Declaration
LogLevel GetLogLevel()
Returns
Type | Description |
---|---|
Log |
Log Level |
GetNotificationEndpointsApi()
Get the Notification
Declaration
INotificationEndpointsApi GetNotificationEndpointsApi()
Returns
Type | Description |
---|---|
INotification |
the new client instance for NotificationEndpoint API |
GetNotificationRulesApi()
Get the Notification
Declaration
INotificationRulesApi GetNotificationRulesApi()
Returns
Type | Description |
---|---|
INotification |
the new client instance for NotificationRules API |
GetOrganizationsApi()
Get the Organization client.
Declaration
IOrganizationsApi GetOrganizationsApi()
Returns
Type | Description |
---|---|
IOrganizations |
the new client instance for Organization API |
GetQueryApi(IDomainObjectMapper)
Get the Query client.
Declaration
IQueryApi GetQueryApi(IDomainObjectMapper mapper = null)
Parameters
Type | Name | Description |
---|---|---|
IDomain |
mapper | the mapper used for mapping FluxResults to POCO |
Returns
Type | Description |
---|---|
IQuery |
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 |
---|---|---|
IDomain |
mapper | the mapper used for mapping FluxResults to POCO |
Returns
Type | Description |
---|---|
IQuery |
the new synchronous client instance for the Query API |
GetScraperTargetsApi()
Get the Scraper
Declaration
IScraperTargetsApi GetScraperTargetsApi()
Returns
Type | Description |
---|---|
IScraper |
the new client instance for Scraper API |
GetSourcesApi()
Get the Source client.
Declaration
ISourcesApi GetSourcesApi()
Returns
Type | Description |
---|---|
ISources |
the new client instance for Source API |
GetTasksApi()
Get the Task
Declaration
ITasksApi GetTasksApi()
Returns
Type | Description |
---|---|
ITasks |
the new client instance for Task API |
GetTelegrafsApi()
Get the Telegraf client.
Declaration
ITelegrafsApi GetTelegrafsApi()
Returns
Type | Description |
---|---|
ITelegrafs |
the new client instance for Telegrafs API |
GetUsersApi()
Get the User client.
Declaration
IUsersApi GetUsersApi()
Returns
Type | Description |
---|---|
IUsers |
the new client instance for User API |
GetWriteApi(IDomainObjectMapper)
Get the Write client.
Declaration
IWriteApi GetWriteApi(IDomainObjectMapper mapper = null)
Parameters
Type | Name | Description |
---|---|---|
IDomain |
mapper | the mapper used for mapping to PointData |
Returns
Type | Description |
---|---|
IWrite |
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 |
---|---|---|
Write |
writeOptions | the configuration for a write client |
IDomain |
mapper | the converter used for mapping to PointData |
Returns
Type | Description |
---|---|
IWrite |
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 |
---|---|---|
IDomain |
mapper | the converter used for mapping to PointData |
Returns
Type | Description |
---|---|
IWrite |
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<Health |
health of an instance |
IsGzipEnabled()
Returns whether Gzip compress for http request body is enabled.
Declaration
bool IsGzipEnabled()
Returns
Type | Description |
---|---|
System. |
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. |
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 |
---|---|---|
Onboarding |
onboarding | to setup defaults |
Returns
Type | Description |
---|---|
Task<Onboarding |
defaults for first run |
Exceptions
Type | Condition |
---|---|
Http |
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. |
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 |
---|---|---|
Log |
logLevel | the log level to set |
VersionAsync()
Return the version of the connected InfluxDB Server.
Declaration
Task<string> VersionAsync()
Returns
Type | Description |
---|---|
Task<System. |
the version String, otherwise unknown |
Exceptions
Type | Condition |
---|---|
Influx |
throws when request did not succesfully ends |