Create a pack
Spaces method and path for this operation:
post /s/{space_id}/api/osquery/packs
Refer to Spaces for more information.
Create a query pack.
POST /api/osquery/packs
curl \ --request POST 'https://localhost:5601/api/osquery/packs' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --data '{"name":"my_pack","shards":{"my_policy_id":35,"fleet-server-policy":58},"enabled":true,"queries":{"my_query":{"query":"SELECT * FROM listening_ports;","timeout":120,"interval":60,"ecs_mapping":{"tags":{"value":["tag1","tag2"]},"client.port":{"field":"port"}}}},"policy_ids":["my_policy_id","fleet-server-policy"],"description":"My pack"}'