Skip to content

Commit

Permalink
[DOCS] Adds shards object to Create pack and Update pack API (#166363)
Browse files Browse the repository at this point in the history
## Summary

- Resolves elastic/security-docs#3822 

Adds the `shards` object schema definition to Create pack and Update
pack API, and to the Create pack request example.

- Related dev PR: #166178
  • Loading branch information
natasha-moore-elastic authored Sep 18, 2023
1 parent 73d1c35 commit 0215ed3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/api/osquery-manager/packs/create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ experimental[] Create packs.

`policy_ids`:: (Optional, array) A list of agents policy IDs.

`shards`:: (Required, object) 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.

`queries`:: (Required, object) An object of queries.


Expand All @@ -56,8 +58,13 @@ $ curl -X POST api/osquery/packs \
"description": "My pack",
"enabled": true,
"policy_ids": [
"my_policy_id"
"my_policy_id",
"fleet-server-policy"
],
"shards": {
"my_policy_id": 35,
"fleet-server-policy": 58
},
"queries": {
"my_query": {
"query": "SELECT * FROM listening_ports;",
Expand All @@ -67,7 +74,10 @@ $ curl -X POST api/osquery/packs \
"field": "port"
},
"tags": {
"value": ["tag1", "tag2"]
"value": [
"tag1",
"tag2"
]
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions docs/api/osquery-manager/packs/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ WARNING: You are unable to update a prebuilt pack (`read_only = true`).

`policy_ids`:: (Optional, array) A list of agent policy IDs.

`shards`:: (Optional, object) 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.

`queries`:: (Required, object) An object of queries.


Expand Down

0 comments on commit 0215ed3

Please sign in to comment.