Update pack APIedit

[preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Update packs.

You are unable to update a prebuilt pack (read_only = true).

Requestedit

PUT <kibana host>:<port>/api/osquery/packs/<id>

PUT <kibana host>:<port>/s/<space_id>/api/osquery/packs/<id>

Path parametersedit

space_id
(Optional, string) The space identifier. When space_id is not provided in the URL, the default space is used.
id
(Required, string) The ID of the pack you want to update.

Request bodyedit

name
(Optional, string) The pack name.
description
(Optional, string) The pack description.
enabled
(Optional, boolean) Enables the pack.
policy_ids
(Optional, array) A list of agent policy IDs.
queries
(Required, object) An object of queries.

Response codeedit

200
Indicates a successful call.

Examplesedit

Update a name of the <my_pack> pack:

$ curl -X PUT api/osquery/packs/<id> \
{
  "name": "updated_my_pack_name",
}

The API returns the pack saved object:

{
    "data": {...}
}