Class: InfluxDB2::DeleteApi
- Inherits:
-
DefaultApi
- Object
- DefaultApi
- InfluxDB2::DeleteApi
- Defined in:
- lib/influxdb2/client/delete_api.rb
Overview
Delete time series data from InfluxDB
Constant Summary
Constants inherited from DefaultApi
InfluxDB2::DefaultApi::DEFAULT_REDIRECT_COUNT, InfluxDB2::DefaultApi::DEFAULT_TIMEOUT, InfluxDB2::DefaultApi::HEADER_CONTENT_TYPE
Instance Method Summary collapse
-
#delete(start, stop, predicate: nil, bucket: nil, org: nil) ⇒ Object
Delete time series data from InfluxDB.
-
#initialize(options:) ⇒ DeleteApi
constructor
A new instance of DeleteApi.
Methods inherited from DefaultApi
Constructor Details
#initialize(options:) ⇒ DeleteApi
Returns a new instance of DeleteApi.
28 29 30 |
# File 'lib/influxdb2/client/delete_api.rb', line 28 def initialize(options:) super(options: ) end |
Instance Method Details
#delete(start, stop, predicate: nil, bucket: nil, org: nil) ⇒ Object
Delete time series data from InfluxDB.
delete('2019-02-03T04:05:06+07:00', '2019-04-03T04:05:06+07:00',
predicate: 'key1="value1" AND key2="value"', bucket: 'my-bucket', org: 'my-org')
delete(DateTime.rfc3339('2019-02-03T04:05:06+07:00'), DateTime.rfc3339('2019-03-03T04:05:06+07:00'),
predicate: 'key1="value1" AND key2="value"', bucket: 'my-bucket', org: 'my-org')
49 50 51 52 53 54 |
# File 'lib/influxdb2/client/delete_api.rb', line 49 def delete(start, stop, predicate: nil, bucket: nil, org: nil) delete_request = InfluxDB2::DeletePredicateRequest.new(start: _to_rfc3339(start), stop: _to_rfc3339(stop), predicate: predicate) _delete(delete_request, bucket: bucket, org: org) end |