DeleteAPI
public class DeleteAPI
Delete time series data from InfluxDB 2.x.
Example:
let predicateRequest = DeletePredicateRequest(
start: Date(timeIntervalSince1970: 0),
stop: Date(),
predicate: "_measurement=\"server\" AND production=\"no\"")
try await client.deleteAPI.delete(predicate: predicateRequest, bucket: "my-bucket", org: "my-org")
print("Successfully data data by:\n\n\(predicateRequest)")
-
Delete points from an InfluxDB by specified predicate.
Declaration
Swift
public func delete(predicate: DeletePredicateRequest, bucket: String? = nil, bucketID: String? = nil, org: String? = nil, orgID: String? = nil, responseQueue: DispatchQueue = .main, completion: @escaping (_ response: Void?, _ error: InfluxDBClient.InfluxDBError?) -> Void)Parameters
predicateDelete predicate statement.
bucketSpecifies the bucket to delete data from.
bucketIDSpecifies the bucket ID to delete data from.
orgSpecifies the organization to delete data from.
orgIDSpecifies the organization ID of the resource.
responseQueueThe queue on which api response is dispatched.
completioncompletion handler to receive the data and the error objects
-
Delete points from an InfluxDB by specified predicate.
Declaration
Swift
public func delete(predicate: DeletePredicateRequest, bucket: String? = nil, bucketID: String? = nil, org: String? = nil, orgID: String? = nil, responseQueue: DispatchQueue = .main, completion: @escaping ( _ result: Swift.Result<Void, InfluxDBClient.InfluxDBError>) -> Void)Parameters
predicateDelete predicate statement.
bucketSpecifies the bucket to delete data from.
bucketIDSpecifies the bucket ID to delete data from.
orgSpecifies the organization to delete data from.
orgIDSpecifies the organization ID of the resource.
responseQueueThe queue on which api response is dispatched.
completioncompletion handler to receive the
Swift.Result -
Delete points from an InfluxDB by specified predicate.
Declaration
Swift
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) public func delete(predicate: DeletePredicateRequest, bucket: String? = nil, bucketID: String? = nil, org: String? = nil, orgID: String? = nil, responseQueue: DispatchQueue = .main) -> AnyPublisher<Void, InfluxDBClient.InfluxDBError>Parameters
predicateDelete predicate statement.
bucketSpecifies the bucket to delete data from.
bucketIDSpecifies the bucket ID to delete data from.
orgSpecifies the organization to delete data from.
orgIDSpecifies the organization ID of the resource.
responseQueueThe queue on which api response is dispatched.
completioncompletion handler to receive the
Swift.Result -
Asynchronously delete points from an InfluxDB by specified predicate.
Declaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public func delete(predicate: DeletePredicateRequest, bucket: String? = nil, bucketID: String? = nil, org: String? = nil, orgID: String? = nil, responseQueue: DispatchQueue = .main) async throwsParameters
predicateDelete predicate statement.
bucketSpecifies the bucket to delete data from.
bucketIDSpecifies the bucket ID to delete data from.
orgSpecifies the organization to delete data from.
orgIDSpecifies the organization ID of the resource.
responseQueueThe queue on which api response is dispatched.
View on GitHub
DeleteAPI Class Reference