Skip to content
Discussion options

You must be logged in to vote

Hi @waschoo !

You'll probably want to grab the IDs and then feed them to the appropriate "getXYZPolicies" (get_policies) operation. I don't think the settings_hash is what you're looking for.

If you add the following around line #68 of this sample:

            prevent_pol_id = device["device_policies"].get("prevention", {}).get("policy_id", None)
            update_pol_id = device["device_policies"].get("sensor_update", {}).get("policy_id", None)

You'll have the IDs for both your prevention and sensor update policy as the loop iterates. Use these value to call getPreventionPolicies and getSensorUpdatePolicies respectively. At that point you should have the policy details for the host, and…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@waschoo
Comment options

@jshcodes
Comment options

@waschoo
Comment options

@jshcodes
Comment options

@waschoo
Comment options

Answer selected by waschoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
sensor update Sensor Update Policy issues and questions hosts Hosts or Host Groups issues and questions SDK usage General SDK usage issues and questions prevention policies Prevention Policies issues and questions
2 participants