Skip to content

Unable to use the buckets_api on Influx 1.8.10 #541

Closed as not planned
Closed as not planned
@Pitastic

Description

@Pitastic

Specifications

  • Client Version: 1.35.0
  • InfluxDB Version: 1.8.10
  • Platform: Linux (Ubuntu 20.04)

Reproduce:

  • Create a new database with the buckets method

On Influx 1.8 I am dealing with databases and not yet with buckets. The only problem is, that there is no client.create_database() anymore. Thanks to your migration guide and the examples in this repo it is clear that I should use the client.buckets_api() for that instead. These API Endpoints don't exist on 1.8 what makes sense to me.

But as this should be backwards compatible with 1.8 is there a workaround for this or am I missing something?

Code sample to reproduce problem

from influxdb_client import InfluxDBClient, BucketRetentionRules

org = ''

with InfluxDBClient(url='http://myserver:8086', token='user:password', org=org) as client:
    buckets_api = client.buckets_api()
    retention_rules = BucketRetentionRules(type="expire", every_seconds=3600)
    created_bucket = buckets_api.create_bucket(bucket_name="bucket-by-python",
                                               retention_rules=retention_rules,
                                               org=org)

Expected behavior

Create a "database" instead of a "bucket".

Actual behavior

Endpoint for API call is not found.

Additional info

influxdb_client.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Type': 'text/plain; charset=utf-8', 'X-Content-Type-Options': 'nosniff', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': '1.8.10', 'Date': 'Tue, 20 Dec 2022 21:42:34 GMT', 'Content-Length': '19'})
HTTP response body: 404 page not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem rightwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions