/api/2.0/fo/compliance/policy
[GET] [POST]
Use the add, remove and set options to manage asset groups for your compliance policies. You must have permission to modify the policy you want to update.
Parameter |
Description |
id={value} |
Policy ID for the policy you want to update. |
asset_group_ids={value} |
Asset groups IDs for the asset groups you want to add to the policy specified in “id”. Multiple IDs are comma separated. Each asset group must have at least 1 assigned IP address. |
evaluate_now={0|1} |
(Optional) Specify evaluate_now=1 to immediately evaluate the policy against assigned assets, and select the Evaluate Now check box in the UI Policy Editor. When this check box is selected we’ll start policy evaluation each time you save changes to the policy from the UI or API. |
Use action=add_asset_group_ids to add asset groups to a specified policy.
API request
https://qualysapi.qualys.com/api/2.0/fo/compliance/policy/?action=add_asset_group_ids
XML output
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/fo/compliance/policy/simple_return.dtd">
<SIMPLE_RETURN>
<RESPONSE>
<DATETIME>2014-09-11T09:06:17Z</DATETIME>
<TEXT>Compliance Policy successfully modified.</TEXT>
<ITEM_LIST>
<ITEM>
<KEY>ID</KEY>
<VALUE>43400</VALUE>
</ITEM>
</ITEM_LIST>
</RESPONSE>
</SIMPLE_RETURN>
Use action=remove_asset_group_ids to add asset groups to a specified policy.
API request
https://qualysapi.qualys.com/api/2.0/fo/compliance/policy/?action=remove_asset_group_ids
XML output
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/fo/compliance/policy/simple_return.dtd">
<SIMPLE_RETURN>
<RESPONSE>
<DATETIME>2014-09-11T09:06:17Z</DATETIME>
<TEXT>Compliance Policy successfully modified.</TEXT>
<ITEM_LIST>
<ITEM>
<KEY>ID</KEY>
<VALUE>43400</VALUE>
</ITEM>
</ITEM_LIST>
</RESPONSE>
</SIMPLE_RETURN>
Use action=set_asset_group_ids to reset the asset groups for a specified policy. Any assigned asset groups not specified in this request will be removed.
API request
https://qualysapi.qualys.com/api/2.0/fo/compliance/policy/?action=set_asset_group_ids
XML output
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://qualysapi.qualys.com/api/2.0/fo/compliance/policy/simple_return.dtd">
<SIMPLE_RETURN>
<RESPONSE>
<DATETIME>2014-09-11T09:07:43Z</DATETIME>
<TEXT>Compliance Policy successfully modified.</TEXT>
<ITEM_LIST>
<ITEM>
<KEY>ID</KEY>
<VALUE>43400</VALUE>
</ITEM>
</ITEM_LIST>
</RESPONSE>
</SIMPLE_RETURN>
<platform API server>/api/2.0/fo/simple_return.dtd