Class MetricsService
Represents a collection of functions to interact with the API endpoints
Inheritance
Implements
Namespace: InfluxDB.Client.Api.Service
Assembly: InfluxDB.Client.dll
Syntax
public class MetricsService : object, IMetricsService, IApiAccessor
Constructors
MetricsService(Configuration)
Initializes a new instance of the MetricsService class using Configuration object
Declaration
public MetricsService(Configuration configuration = null)
Parameters
Type | Name | Description |
---|---|---|
InfluxDB.Client.Api.Client.Configuration | configuration | An instance of Configuration |
MetricsService(String)
Initializes a new instance of the MetricsService class.
Declaration
public MetricsService(string basePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | basePath |
Properties
Configuration
Gets or sets the configuration object
Declaration
public Configuration Configuration { get; set; }
Property Value
Type | Description |
---|---|
InfluxDB.Client.Api.Client.Configuration | An instance of the Configuration |
ExceptionFactory
Provides a factory method hook for the creation of exceptions.
Declaration
public ExceptionFactory ExceptionFactory { get; set; }
Property Value
Type | Description |
---|---|
InfluxDB.Client.Api.Client.ExceptionFactory |
Methods
AddDefaultHeader(String, String)
Add default header.
Declaration
public void AddDefaultHeader(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Header field name. |
System.String | value | Header field value. |
DefaultHeader()
Gets the default header.
Declaration
public IDictionary<string, string> DefaultHeader()
Returns
Type | Description |
---|---|
IDictionary<System.String, System.String> | Dictionary of HTTP header |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
System.String | The base path |
GetMetrics(String)
Get metrics of an instance
Declaration
public string GetMetrics(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
System.String | string |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetMetricsAsync(String, CancellationToken)
Get metrics of an instance
Declaration
public async System.Threading.Tasks.Task<string> GetMetricsAsync(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Task of string |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetMetricsAsyncWithHttpInfo(String, CancellationToken)
Get metrics of an instance
Declaration
public async System.Threading.Tasks.Task<ApiResponse<string>> GetMetricsAsyncWithHttpInfo(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<InfluxDB.Client.Api.Client.ApiResponse<System.String>> | Task of ApiResponse (string) |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetMetricsAsyncWithIRestResponse(String, CancellationToken)
Get metrics of an instance
Declaration
public async System.Threading.Tasks.Task<RestResponse> GetMetricsAsyncWithIRestResponse(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<RestResponse> | Task of RestResponse (string) |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetMetricsWithHttpInfo(String)
Get metrics of an instance
Declaration
public ApiResponse<string> GetMetricsWithHttpInfo(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
InfluxDB.Client.Api.Client.ApiResponse<System.String> | ApiResponse of string |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetMetricsWithIRestResponse(String)
Get metrics of an instance
Declaration
public RestResponse GetMetricsWithIRestResponse(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
RestResponse | ApiResponse of string |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetMetricsWithIRestResponseAsync(String, CancellationToken)
Get metrics of an instance
Declaration
public async System.Threading.Tasks.Task<RestResponse> GetMetricsWithIRestResponseAsync(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<RestResponse> | ApiResponse of string |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetMetricsWithRestRequest(String)
Get metrics of an instance
Declaration
public RestRequest GetMetricsWithRestRequest(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
RestRequest | ApiResponse of string |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
SetBasePath(String)
Sets the base path of the API client.
Declaration
public void SetBasePath(string basePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | basePath |