We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give me advice. How can I delete points? Which type of api I should use: write or query?
The text was updated successfully, but these errors were encountered:
Hi @skillbox-koutja,
thanks for using our client.
The DefaultService.php supports deletes points from an InfluxDB bucket. You could use something like:
<?php /** * Shows how to delete data from InfluxDB by client */ use InfluxDB2\Client; use InfluxDB2\Model\DeletePredicateRequest; use InfluxDB2\Service\DefaultService; $url = 'http://localhost:8086'; $token = 'my-token'; $org = 'my-org'; $bucket = 'my-bucket'; $client = new Client([ "url" => $url, "token" => $token, "bucket" => $bucket, "org" => $org, "precision" => InfluxDB2\Model\WritePrecision::S ]); // // Delete data by measurement and tag value // /** @var DefaultService $service */ $service = $client->createService(DefaultService::class); $predicate = new DeletePredicateRequest(); $predicate->setStart(DateTime::createFromFormat('Y', '2020')); $predicate->setStop(new DateTime()); $predicate->setPredicate("_measurement=\"mem\" AND host=\"host1\""); $service->deletePost($predicate, null, $org, $bucket); $client->close();
Regards
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Give me advice. How can I delete points? Which type of api I should use: write or query?
The text was updated successfully, but these errors were encountered: