Request exception

/api/2.0/fo/compliance/exception/?action=request

[POST]

Create an exception. By default the expiry date matches the creation date. This API is supported using PC.

Permissions - Click here for permissions info

Input Parameters

Parameter

Description

action=request

(Required) Action "create" is also supported.

echo_request={0|1}

(Optional) Specify 1 to view (echo) input parameters in the XML output. By default these are not included.

control_id={value}

(Required) Specify the control ID of the control for which you want to request an exception.

host_id={value}

(Required) Specify the host ID of the host for which you want to request an exception.

policy_id={value}

(Required) Specify the policy ID of the policy that contains the control for which you want to request an exception.

technology_id={value}

(Required) Specify the technology ID of the technology associated with the host for which you want to request an exception.

instance_string={value}

(Optional) 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.

assignee_id={value}

(Required) 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) User defined comments.

reopen_on_evidence_change={0|1}

(Optional) 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.

Sample - Request exception

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=2449482824

reopen_on_evidence_change=1&comments=new exception" "https://qualysapi.qualys.com/api/2.0/fo/compliance/exception/"

XML output

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE SIMPLE_RETURN SYSTEM "https://qualysapi.qualys.com/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>

DTD

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