Policy Asset Groups

GET POST/api/2.0/fo/compliance/policy

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.

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

id={value}

Required

Integer 

Policy ID for the policy you want to update.

asset_group_ids={value}

Required 

Integer 

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

Integer 

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.

Sample - Add Asset GroupsSample - Add Asset Groups

Use action=add_asset_group_ids to add asset groups to a specified policy.

API Request

https://<qualys_base_url>/api/2.0/fo/compliance/policy/?action=add_asset_group_ids

XML Output

<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/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>

Sample - Remove Asset GroupsSample - Remove Asset Groups

Use action=remove_asset_group_ids to add asset groups to a specified policy.

API Request

https://<qualys_base_url>/api/2.0/fo/compliance/policy/?action=remove_asset_group_ids

XML Output

<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/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>

Sample - Reset Asset GroupsSample - Reset Asset Groups

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://<qualys_base_url>/api/2.0/fo/compliance/policy/?action=set_asset_group_ids

XML Output

<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/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>

DTD

<platform API server>/api/2.0/fo/simple_return.dtd

 


 

 

Was this topic helpful?

success Thank you! We're glad to hear that this topic was useful.
success We appreciate your feedback. We'll work to make this topic better for you in the future.