LabelsAPI
public class LabelsAPI
-
Declaration
Swift
public init(influxDB2API: InfluxDB2API)
-
Delete a label
Declaration
Swift
public func deleteLabelsID(labelID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: Void?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
labelID
(path) The ID of the label 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
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func deleteLabelsID(labelID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> Void?
Parameters
labelID
(path) The ID of the label 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 labels
Declaration
Swift
public func getLabels(zapTraceSpan: String? = nil, orgID: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: LabelsResponse?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
zapTraceSpan
(header) OpenTracing span context (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
-
getLabels(zapTraceSpan:
AsynchronousorgID: apiResponseQueue: ) List all labels
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getLabels(zapTraceSpan: String? = nil, orgID: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> LabelsResponse?
Parameters
zapTraceSpan
(header) OpenTracing span context (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 label
Declaration
Swift
public func getLabelsID(labelID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: LabelResponse?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
labelID
(path) The ID of the label to update.
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
-
getLabelsID(labelID:
AsynchronouszapTraceSpan: apiResponseQueue: ) Retrieve a label
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func getLabelsID(labelID: String, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> LabelResponse?
Parameters
labelID
(path) The ID of the label to update.
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 label
Declaration
Swift
public func patchLabelsID(labelID: String, labelUpdate: LabelUpdate, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: LabelResponse?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
labelID
(path) The ID of the label to update.
labelUpdate
(body) Label update
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 label
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func patchLabelsID(labelID: String, labelUpdate: LabelUpdate, zapTraceSpan: String? = nil, apiResponseQueue: DispatchQueue? = nil) async throws -> LabelResponse?
Parameters
labelID
(path) The ID of the label to update.
labelUpdate
(body) Label update
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 label
Declaration
Swift
public func postLabels(labelCreateRequest: LabelCreateRequest, apiResponseQueue: DispatchQueue? = nil, completion: @escaping (_ data: LabelResponse?, _ error: InfluxDBClient.InfluxDBError?) -> Void)
Parameters
labelCreateRequest
(body) Label to create
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects
-
postLabels(labelCreateRequest:
AsynchronousapiResponseQueue: ) Create a label
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func postLabels(labelCreateRequest: LabelCreateRequest, apiResponseQueue: DispatchQueue? = nil) async throws -> LabelResponse?
Parameters
labelCreateRequest
(body) Label to create
apiResponseQueue
The queue on which api response is dispatched.
completion
completion handler to receive the data and the error objects