influxdata/influxdb · error · Error

missing query parameters 'db'

Error message

missing query parameters 'db'

What it means

This error indicates a request to the delete-database endpoint was made without the required `db` query parameter. The server needs to know which database to delete and refuses to proceed (or guess) when `db` is absent. The message text names the missing parameter.

Solutions

  1. Add the `db` query parameter naming the database to delete: DELETE ...?db=mydb.
  2. Verify the database name is non-empty after any string interpolation.
  3. Check the exact route and parameter names for your server version (v1/v3 naming differs).
  4. Confirm no proxy or SDK layer is stripping query parameters from the request.

Example fix

// before
client.delete("http://localhost:8181/api/v3/delete")
// after
client.delete("http://localhost:8181/api/v3/delete?db=metrics")
Defensive patterns

Strategy: validation

Validate before calling

fn assert_db_param(db: &str) -> Result<&str, String> {
    if db.trim().is_empty() { Err("'db' query parameter is required".into()) } else { Ok(db) }
}

Prevention

When it happens

Trigger: Calling DELETE /api/v3/{db} style delete route (or its configured equivalent) without `?db=...`, e.g. an empty query string or the parameter lost during URL construction.

Common situations: Template/interpolation bug leaving `db=` empty; client library version mismatch sending parameters in the body instead of the query string; proxies rewriting the URL and dropping query parameters.

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


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/0ab9b2ce5fc151fd. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_server/src/http.rs:264

    /// The request has no authentication, but authorization is configured.
    #[error("authentication required")]
    Unauthenticated,

    /// The provided authorization is not sufficient to perform the request.
    #[error("access denied")]
    Forbidden,

    /// The HTTP request method is not supported for this resource
    #[error("unsupported method")]
    UnsupportedMethod,

    /// Hyper serving error
    #[error("error serving http: {0}")]
    ServingHttp(#[from] hyper::Error),

    /// Missing parameters for query
    #[error("missing query parameters 'db'")]
    MissingDeleteDatabaseParams,

    /// Missing parameters for query
    #[error("missing query parameters 'db' and 'q'")]
    MissingQueryParams,

    /// Missing the `q` parameter in the v1 /query API
    #[error("missing query parameter 'q'")]
    MissingQueryV1Params,

    /// MIssing parameters for write
    #[error("missing query parameter 'db'")]
    MissingWriteParams,

    #[error("the mime type specified was not valid UTF8: {0}")]
    NonUtf8MimeType(#[from] FromUtf8Error),

    /// Serde decode error

View on GitHub (pinned to 06200ef96b)