Copy a pack
https://{kibana_url}
- POST /api/osquery/packs/{id}/copy
- POST /s/{space_id}/api/osquery/packs/{id}/copy
Refer to Spaces for more information.
Create a copy of a query pack with a unique name by appending a _copy suffix. If the name already exists, a numeric suffix is added (e.g., _copy_2). The copied pack is always created with enabled set to false.
Path Parameters
-
idstringrequired -
The ID of the pack to copy.
Response
Indicates a successful call.
-
dataobjectrequired -
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. -
namestringrequired -
The pack name.
-
policy_idsobject -
A list of agents policy IDs.
-
queriesobject -
Pack queries in saved-object storage format (array). Note: the read endpoint returns object format.
-
ecs_mappingobject -
ECS mapping in saved-object storage format (array of key-value pairs). The find and copy pack endpoints return this format. The read endpoint returns object format (ECSMapping).
-
idstring -
intervalinteger -
platformstring -
querystring -
removedboolean -
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 -
snapshotboolean -
timeoutinteger -
versionstring -
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_idstringrequired -
The saved object ID of the copied 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 -
updated_atstring -
updated_bystringnullable -
updated_by_profile_uidstring -
versioninteger -
The pack version number.