Skip to content
New issue

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

Where I can find the bucket_id(not the bucket_name)? #86

Closed
GF-Huang opened this issue Apr 27, 2020 · 3 comments · Fixed by #91
Closed

Where I can find the bucket_id(not the bucket_name)? #86

GF-Huang opened this issue Apr 27, 2020 · 3 comments · Fixed by #91
Labels
bug Something isn't working
Milestone

Comments

@GF-Huang
Copy link

GF-Huang commented Apr 27, 2020

delete_api = client.delete_api()
delete_api.delete('1970-01-01T00:00:00Z', '2020-04-27T00:00:00Z', '_measurement="daily"', 'finance_data', 'administators')
{
    "code":"invalid",
    "message":"id must have a length of 16 bytes"
}
@bednar
Copy link
Contributor

bednar commented Apr 27, 2020

Hi @GF-Huang,

the delete_api should also accept a bucket_name. It is a bug... we will fix it ASAP.

As a workaround you could use something like that:

from influxdb_client import DeletePredicateRequest
from influxdb_client import DefaultService

predicate_request = DeletePredicateRequest(start='1970-01-01T00:00:00Z', stop='2020-04-27T00:00:00Z', predicate='_measurement="daily"')
service = DefaultService(self.client.api_client)

service.delete_post(delete_predicate_request=predicate_request, bucket='finance_data', org='administators')

Regards

@bednar bednar added the bug Something isn't working label Apr 27, 2020
@bednar bednar added this to the 1.7.0 milestone May 7, 2020
@bednar
Copy link
Contributor

bednar commented May 11, 2020

Hi @GF-Huang,

the delete_api is fixed in 1.7.0 milestone.

If you would like to test it then install client via:

pip install git+https://github.com/influxdata/influxdb-client-python.git@master

Regards

@GF-Huang
Copy link
Author

Got it, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants