# unknown_parameter

HTTP 422 · `code`: `unknown_parameter` · `title`: Unknown parameter

**This code is retired: the API no longer sends it.** It answered a `GET` that sent a query parameter the operation does not take. Such a name is now ignored: the call is answered as if the name had not been sent, with no error and no header naming it. The panel shows the answer the code used to give.

What a client sees now:

-   A misspelt or unknown filter is not applied. A call with `stauts=open` reads every incident, not the open ones: check a filter’s name against the [reference](https://developer.watchtower15.com/api/reference/), which lists every parameter an operation takes.
-   `page` and `per_page` are read on the page lists and ignored on the lists that page by time (log search, a custom metric’s samples, a service’s scans and runs). `offset`, `page_size` and the like are ignored everywhere. See [pagination](https://developer.watchtower15.com/api/pagination/).
-   A `cursor` sent to a page list is ignored: the answer is the page named by `page`, or the first page.
-   `organisation_uuid`, or a path parameter sent again in the query, changes nothing: the organisation is always the key’s, and the path’s value is the one used.
-   A body field a write does not take was always ignored, and still is. A field a write refuses outright is still `422 invalid_request`.

The Problem schema keeps `accepted_parameters`, marked deprecated, so a client generated from an older document still reads; it is never sent.

## What the answer carried

Every [problem document](https://developer.watchtower15.com/api/errors/) carries `type`, `title`, `status`, `code`, `detail` and `request_id`. This code added `errors`, an object of the unknown parameter names, each with one sentence, and `accepted_parameters`, the list of the query parameters the operation takes.

## What to do

Nothing is refused for an unknown query parameter any more. A client that handled this code can keep its handler; it is never reached. To be sure a filter applies, use the names the [reference](https://developer.watchtower15.com/api/reference/) lists.

## This page's address

The API's answer names this page in `type` as `https://docs.watchtower15.com/api/errors/unknown_parameter/`, an identifier that never changes within `v1`. That address answers with a permanent redirect to this page, so a link in a log still opens it, and a client comparing `type` as a string never breaks.

**Response (retired, no longer sent) (422 Unprocessable Content)**

```http
HTTP/1.1 422 Unprocessable Content
Content-Type: application/problem+json
X-Request-Id: 4d1e8b7a-2c9f-4a3e-b6d5-7f0c1a2e3b4d

{
  "type": "https://docs.watchtower15.com/api/errors/unknown_parameter/",
  "title": "Unknown parameter",
  "status": 422,
  "code": "unknown_parameter",
  "detail": "This operation does not take the query parameter `zz`. It takes no query parameter.",
  "request_id": "4d1e8b7a-2c9f-4a3e-b6d5-7f0c1a2e3b4d",
  "errors": {
    "zz": [
      "The `zz` parameter is not one this operation takes."
    ]
  },
  "accepted_parameters": []
}
```

Source: https://developer.watchtower15.com/api/errors/unknown_parameter/
