Path parameters

  • filter_idstring Required

    A string that uniquely identifies a filter.

application/json

BodyRequired

  • add_itemsarray[string]

    The items to add to the filter.

  • A description for the filter.

  • remove_itemsarray[string]

    The items to remove from the filter.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
POST /_ml/filters/{filter_id}/_update
POST _ml/filters/safe_domains/_update
{
  "description": "Updated list of domains",
  "add_items": ["*.myorg.com"],
  "remove_items": ["wikipedia.org"]
}
resp = client.ml.update_filter(
    filter_id="safe_domains",
    description="Updated list of domains",
    add_items=[
        "*.myorg.com"
    ],
    remove_items=[
        "wikipedia.org"
    ],
)
const response = await client.ml.updateFilter({
  filter_id: "safe_domains",
  description: "Updated list of domains",
  add_items: ["*.myorg.com"],
  remove_items: ["wikipedia.org"],
});
response = client.ml.update_filter(
  filter_id: "safe_domains",
  body: {
    "description": "Updated list of domains",
    "add_items": [
      "*.myorg.com"
    ],
    "remove_items": [
      "wikipedia.org"
    ]
  }
)
$resp = $client->ml()->updateFilter([
    "filter_id" => "safe_domains",
    "body" => [
        "description" => "Updated list of domains",
        "add_items" => array(
            "*.myorg.com",
        ),
        "remove_items" => array(
            "wikipedia.org",
        ),
    ],
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"description":"Updated list of domains","add_items":["*.myorg.com"],"remove_items":["wikipedia.org"]}' "$ELASTICSEARCH_URL/_ml/filters/safe_domains/_update"
Request example
An example body for a `POST _ml/filters/safe_domains/_update` request.
{
  "description": "Updated list of domains",
  "add_items": ["*.myorg.com"],
  "remove_items": ["wikipedia.org"]
}