Skip to content

Flux Queries With V1 Client Against OSS 2.x #78

@kbredemeier

Description

@kbredemeier

The org is not added to the URL parameters when using a connection configured for v1 against an InfluxDB OSS 2.x.
The API documentation states that either one of those is required in the query parameters.

defmodule V1 do
  use Instream.Connection,
    config: [
      auth: [
        method: :token,
        token: System.fetch_env!("LB_INFLUXDB_LOCAL_TOKEN")
      ],
      org: "instream_test",
      version: :v1,
      database: "mapped_database"
    ]
end

V1.query(
  """
  import "influxdata/influxdb/schema"

  schema.measurements(bucket: "test_bucket")
  """,
  query_language: :flux
)

%{code: "invalid", message: "failed to decode request body: Please provide either orgID or org"}

I'm currently working on a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions