Spaces method and path for this operation:
Refer to Spaces for more information.
Update a query pack using the pack ID.
You cannot update a prebuilt pack.
Body
Required
-
The pack description.
-
Enables the pack.
-
Pack-level interval, in seconds. Used when
schedule_typeisinterval. Mutually exclusive withrrule_schedule.Minimum value is
1. -
The pack name.
-
A list of agents policy IDs.
-
An object of queries.
-
RRULE schedule configuration consumed by osquerybeat. Loose date forms like
"2024-01-01"are rejected with 400. DTSTART is NOT embedded inrrule; the separatestart_datefield is the schedule anchor. -
Discriminator for the pack's schedule mode.
intervaluses native osqueryd interval scheduling (seconds).rruleuses osquerybeat's RRULE-based recurrence scheduling. Per-query overrides MUST use the same mode as the pack — cross-mode overrides are rejected with 400.Values are
intervalorrrule. -
An object with shard configuration for policies included in the pack. For each policy, set the shard configuration to a percentage (1–100) of target hosts.
curl \
--request PUT 'https://<KIBANA_URL>/api/osquery/packs/3c42c847-eb30-4452-80e0-728584042334' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"description":"Updated pack description","enabled":true,"name":"my_pack_renamed"}'
{
"description": "Updated pack description",
"enabled": true,
"name": "my_pack_renamed"
}
{
"data": {
"description": "Updated pack description",
"enabled": true,
"name": "my_pack_renamed",
"policy_ids": [
"my_policy_id"
],
"queries": {
"ports": {
"interval": 60,
"query": "SELECT * FROM listening_ports;",
"removed": false,
"snapshot": true,
"timeout": 120
}
},
"saved_object_id": "1c266590-381f-428c-878f-c80c1334f856",
"shards": [],
"updated_at": "2025-02-27T10:00:00.000Z",
"updated_by": "elastic",
"version": 2
}
}