VariablesAPI
public class VariablesAPI
-
Declaration
Swift
public init(influxDB2API: InfluxDB2API)
-
Delete a variable
Declaration
Swift
public func deleteVariablesID(variableID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Void?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
variableID
(path) The variable ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Delete a variable
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func deleteVariablesID(variableID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Void?
Parameters
variableID
(path) The variable ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Delete a label from a variable
Declaration
Swift
public func deleteVariablesIDLabelsID(variableID: String, labelID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Void?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
variableID
(path) The variable ID.
labelID
(path) The label ID to delete.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Delete a label from a variable
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func deleteVariablesIDLabelsID(variableID: String, labelID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Void?
Parameters
variableID
(path) The variable ID.
labelID
(path) The label ID to delete.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all variables
Declaration
Swift
public func getVariables(zapTraceSpan: String? = nil, org: String? = nil, orgID: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Variables?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
zapTraceSpan
(header) OpenTracing span context (optional)
org
(query) The name of the organization. (optional)
orgID
(query) The organization ID. (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all variables
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getVariables(zapTraceSpan: String? = nil, org: String? = nil, orgID: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Variables?
Parameters
zapTraceSpan
(header) OpenTracing span context (optional)
org
(query) The name of the organization. (optional)
orgID
(query) The organization ID. (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Retrieve a variable
Declaration
Swift
public func getVariablesID(variableID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Variable?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
variableID
(path) The variable ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Retrieve a variable
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getVariablesID(variableID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Variable?
Parameters
variableID
(path) The variable ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all labels for a variable
Declaration
Swift
public func getVariablesIDLabels(variableID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: LabelsResponse?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
variableID
(path) The variable ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
List all labels for a variable
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getVariablesIDLabels(variableID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> LabelsResponse?
Parameters
variableID
(path) The variable ID.
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Update a variable
Declaration
Swift
public func patchVariablesID(variableID: String, variable: Variable, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Variable?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
variableID
(path) The variable ID.
variable
(body) Variable update to apply
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Update a variable
Declaration
Parameters
variableID
(path) The variable ID.
variable
(body) Variable update to apply
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Create a variable
Declaration
Swift
public func postVariables(variable: Variable, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Variable?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
variable
(body) Variable to create
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Create a variable
Declaration
Parameters
variable
(body) Variable to create
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Add a label to a variable
Declaration
Swift
public func postVariablesIDLabels(variableID: String, labelMapping: LabelMapping, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: LabelResponse?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
variableID
(path) The variable ID.
labelMapping
(body) Label to add
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Add a label to a variable
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func postVariablesIDLabels(variableID: String, labelMapping: LabelMapping, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> LabelResponse?
Parameters
variableID
(path) The variable ID.
labelMapping
(body) Label to add
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Replace a variable
Declaration
Swift
public func putVariablesID(variableID: String, variable: Variable, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Variable?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
variableID
(path) The variable ID.
variable
(body) Variable to replace
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
Replace a variable
Declaration
Parameters
variableID
(path) The variable ID.
variable
(body) Variable to replace
zapTraceSpan
(header) OpenTracing span context (optional)
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects