influxdata/influxdb · error · V2WriteParseError::NoQueryParams
no org/bucket destination provided
Error message
no org/bucket destination provided
What it means
V2WriteParseError::NoQueryParams is returned when a v2 write request contains no org/bucket destination information. The library needs org and bucket query parameters to derive the target namespace; without them the request is rejected.
Solutions
- Add org and bucket query parameters to the v2 write URL.
- Verify the client's org/bucket configuration values are non-empty.
- If writing v1-style requests, use the v1 endpoint which accepts db instead.
- Handle V2WriteParseError::NoQueryParams with a 400 response naming the missing org/bucket params.
Example fix
// before POST /api/v2/write?precision=ns // after POST /api/v2/write?org=myorg&bucket=mybucket&precision=ns
Defensive patterns
Strategy: validation
Validate before calling
let params: Vec<(String, String)> = url.query_pairs().into_owned().collect();
assert!(params.iter().any(|(k, _)| k == "org") && params.iter().any(|(k, _)| k == "bucket"),
"v2 write requires org and bucket params"); Try / catch
match err {
V2WriteParseError::NoQueryParams => /* 400: org and bucket query parameters required */,
other => /* propagate */,
} Prevention
- Set org and bucket explicitly in client configuration and validate at startup.
- Do not reuse v1 URLs against the v2 endpoint.
- Use SDK write builders that require org/bucket.
When it happens
Trigger: POSTing to /api/v2/write with no query parameters, or with only precision supplied and both org and bucket missing.
Common situations: InfluxDB 2.x clients misconfigured so org/bucket env vars are empty; SDK calls omitting the WriteParams; copy-pasted v1 URLs (which use db) pointed at the v2 endpoint.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- failed to deserialize org/bucket/precision in request
- failed to deserialize db/rp/precision in request
- no db destination provided
- invalid request
- missing bucket value
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/1d2d5a7126069ed2.
Report an issue: GitHub.
Appendix: source
Thrown at core/iox_http/src/write/v2.rs:17
//! Parsing of HTTP requests that conform to the [V2 Write API], with modified
//! behaviour for single-tenancy clusters and edge/community/pro only.
//!
//! [V2 Write API]:
//! https://docs.influxdata.com/influxdb/v2.6/api/#operation/PostWrite
use iox_http_util::Request;
use serde::Deserialize;
use super::Precision;
/// v2 DmlErrors returned when decoding the organisation / bucket information
/// from a HTTP request and deriving the namespace name from it.
#[derive(Debug, thiserror::Error)]
pub enum V2WriteParseError {
/// The request contains no org/bucket destination information.
#[error("no org/bucket destination provided")]
NoQueryParams,
/// The request contains invalid parameters.
#[error("failed to deserialize org/bucket/precision in request: {0}")]
DecodeFail(#[from] serde::de::value::Error),
}
/// Query parameters for v2 write requests.
#[derive(Debug, Deserialize)]
pub struct WriteParamsV2 {
#[serde(default)]
pub org: String,
#[serde(default)]
pub bucket: String,
#[serde(default)]
pub precision: Precision,
}View on GitHub (pinned to 06200ef96b)