Create an exception. By default the expiry date matches the creation date. This API is supported using PC.
Permissions - Click here for permissions info
Parameter |
Required/Optional |
Data Type |
Description |
---|---|---|---|
action=request |
Required |
String |
Action "create" is also supported. |
echo_request={0|1} |
Optional |
Integer |
Specify 1 to view (echo) input parameters in the XML output. By default these are not included. |
control_id={value} |
Required |
Integer |
Specify the control ID of the control for which you want to request an exception. |
host_id={value} |
Required |
Integer |
Specify the host ID of the host for which you want to request an exception. |
policy_id={value} |
Required |
Integer |
Specify the policy ID of the policy that contains the control for which you want to request an exception. |
technology_id={value} |
Required |
Integer |
Specify the technology ID of the technology associated with the host for which you want to request an exception. |
instance_string={value} |
Optional |
Integer |
Specifies a single instance on the selected host. The instance string may be “os” or a string like “oracle10:1:1521:ora10204u”. This parameter must be specified with: host_id. Note: This parameter is required when you are raising the exception on control that is associated with instance technology. For example:-MSSQL 2022:1:1433:MSSQLSERVER:master. |
assignee_id={value} |
Required |
Integer |
You can assign exception to another user. Specify user ID of the user, who has access to the hosts that the exceptions apply to. |
comments={value} |
Required |
String |
User defined comments. |
reopen_on_evidence_change={0|1} |
Optional |
Integer |
This applies only if the exception is approved. Reopen the exception if a future scan returns a value that is different than the current value and the control is still failing. |
API Request
curl -k -H "X-Requested-With: Curl" -u "xxxxxxxxx" -X "POST" -d "action=request&control_id=16832&host_id=3753479&policy_id=1366063&technology_id=390&assignee_id=996765&reopen_on_evidence_change=0&comments=comment&instance_string=MSSQL 2022:1:1433:MSSQLSERVER:master" "<qualys_base_url>/api/2.0/fo/compliance/exception/"
XML Output
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM "<qualys_base_url>/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
<RESPONSE>
<DATETIME>2023-11-28T11:21:31Z</DATETIME>
<TEXT>Exception created successfully</TEXT>
<ITEM_LIST>
<ITEM>
<KEY>EXCEPTION_NUMBER</KEY>
<VALUE>59</VALUE>
</ITEM>
</ITEM_LIST>
</RESPONSE>
</SIMPLE_RETURN>
API Request
curl -u "USERNAME:PASSWD" -H "X-Requested-With: Curl" -X "POST" -d "action=request&control_id=1113&host_id=28595192824&policy_id=801459496&technology_id=45&assignee_id=2449482824reopen_on_evidence_change=1&comments=new exception" "https://<qualys_base_url>/api/2.0/fo/compliance/exception/"
XML Output
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
<RESPONSE>
<DATETIME>2018-04-15T10:14:43Z</DATETIME>
<TEXT>Exception created successfully</TEXT>
<ITEM_LIST>
<ITEM>
<KEY>EXCEPTION_NUMBER</KEY>
<VALUE>15</VALUE>
</ITEM>
</ITEM_LIST>
</RESPONSE>
</SIMPLE_RETURN>
<platform API server>/api/2.0/simple_return.dtd