Update a pack
https://{kibana_url}
- PUT /api/osquery/packs/{id}
- PUT /s/{space_id}/api/osquery/packs/{id}
Refer to Spaces for more information.
Update a query pack using the pack ID.
info You cannot update a prebuilt pack.
Path Parameters
-
idstringrequired -
The pack ID.
Request
-
descriptionstring -
The pack description.
-
enabledboolean -
Enables the pack.
-
intervalinteger · min: 1 -
Pack-level interval, in seconds. Used when
schedule_typeisinterval. Mutually exclusive withrrule_schedule. -
namestring -
The pack name.
-
policy_idsobject -
A list of agents policy IDs.
-
queriesobject -
An object of queries.
-
rrule_schedule -
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. -
end_datestring · max: 64 -
Optional RFC 3339 datetime string for the schedule's end. MUST be after
start_date. -
rrulestring · max: 2048required -
Fully serialized RFC 5545 RRULE string (e.g.
"FREQ=WEEKLY;BYDAY=MO,WE,FR"). The Kibana UI writes only a subset of parts —FREQ,INTERVAL,BYDAY,BYMONTHDAY,BYMONTH— but the server accepts and round-trips any well-formed parts (other recognized parts likeBYHOUR,BYMINUTE,BYSETPOS,WKST,COUNT,UNTILare preserved verbatim). -
splaystring · max: 64 -
Optional Go duration string for splay (random execution delay), e.g.
"30s","5m","1h". The Kibana form writes single-unit values only; compound durations ("1h30m") are tolerated on read for round-trip safety with osquerybeat's writer. Maximum 12 hours (43200 seconds). -
start_datestring · max: 64required -
RFC 3339 datetime string for the schedule's start.
-
timeoutnumber -
Optional query execution timeout, in seconds. Defaults to 60 in osquerybeat when unset.
-
schedule_type -
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:
intervalrrule -
shardsobject -
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.
Response
Indicates a successful call.
-
dataobject -
created_atstring -
created_bystringnullable -
created_by_profile_uidstring -
descriptionstring -
The pack description.
-
enabledboolean -
Enables the pack.
-
intervalinteger · min: 1 -
Pack-level interval, in seconds. Used when
schedule_typeisinterval. Mutually exclusive withrrule_schedule. -
namestring -
The pack name.
-
policy_idsobject -
A list of agents policy IDs.
-
queriesobject -
An object of queries.
-
rrule_schedule -
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. -
end_datestring · max: 64 -
Optional RFC 3339 datetime string for the schedule's end. MUST be after
start_date. -
rrulestring · max: 2048required -
Fully serialized RFC 5545 RRULE string (e.g.
"FREQ=WEEKLY;BYDAY=MO,WE,FR"). The Kibana UI writes only a subset of parts —FREQ,INTERVAL,BYDAY,BYMONTHDAY,BYMONTH— but the server accepts and round-trips any well-formed parts (other recognized parts likeBYHOUR,BYMINUTE,BYSETPOS,WKST,COUNT,UNTILare preserved verbatim). -
splaystring · max: 64 -
Optional Go duration string for splay (random execution delay), e.g.
"30s","5m","1h". The Kibana form writes single-unit values only; compound durations ("1h30m") are tolerated on read for round-trip safety with osquerybeat's writer. Maximum 12 hours (43200 seconds). -
start_datestring · max: 64required -
RFC 3339 datetime string for the schedule's start.
-
timeoutnumber -
Optional query execution timeout, in seconds. Defaults to 60 in osquerybeat when unset.
-
saved_object_idstring -
The saved object ID of the pack.
-
schedule_type -
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:
intervalrrule -
shardsobject -
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.
-
updated_atstring -
updated_bystringnullable -
updated_by_profile_uidstring -
versioninteger -
The pack version number.