Search Questionnaires API

Use this API to search questionnaires of a campaign.

POST /qps/rest/1.0/search/saq/questionnaire/

Permissions

The user must have the Security Assessment Questionnaire (SAQ) module enabled, the user must have API ACCESS, Access SAQ module, and Questionnaire Campaign permissions.

Campaign must be within the API user's scope.

Input ParameterInput Parameter

The following input elements are optional and act as filters. When multiple elements are specified, parameters are combined using a logical AND.

Parameter Mandatory/Optional Data Type  Description Allowed Operators
id Optional  Long ID of the questionnaire 

Supports "EQUALS" and "IN" operators. <Criteria field="id" operator="EQUALS">1234</Criteria>

campaign.id Optional  Long ID of the campaign.

Supports "EQUALS" and "IN" operators. <Criteria field="campaign.id" operator="EQUALS">4527</Criteria>

state Optional  String State of the questionnaire.

The values are INFORMATION_GATHERING, APPROVAL, REVIEW, CANCELED, INCOMPLETE, CLOSED.

Supports "EQUALS" and "IN" operators. <Criteria field="state" operator="EQUALS">REVIEW</Criteria>

risk  Optional  String Risk value assigned to the questionnaire. The values are VERY_HIGH, HIGH, MEDIUM, LOW.

Supports "EQUALS" and "IN" operators. <Criteria field="risk" operator="LOW">REVIEW</Criteria>

Sample - Search QuestionnairesSample - Search Questionnaires

API Request

 
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @-
"https://<qualysbaseurl>/qps/rest/1.0/search/saq/questionnaire/"

 

Request POST Data

 
<?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
    <filters>
        <Criteria field="state" operator="EQUALS">APPROVAL</Criteria>
    </filters>
</ServiceRequest>

Response

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http:// <qualysbaseurl>/qps/xsd/1.0/saq/questionnaire.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>2</count>
    <hasMoreRecords>false</hasMoreRecords>
    <data>
        <Questionnaire>
            <id>707802</id>
            <title>Test-campaign-demo1 - responder r</title>
            <dueDate>2019-10-28T00:00:00Z</dueDate>
            <assignedDate>2019-10-23T06:31:48Z</assignedDate>
            <createdBy>
                <id>70596886</id>
                <uuid>3d124658-8f4f-771d-806d-1e18a04a1acf</uuid>
                <firstName>api-user</firstName>
                <lastName>api-user</lastName>
                <company>afko</company>
                <emailAddress>user@email.com</emailAddress>
                <userName>user</userName>
                <title>QA</title>
                <tags>
                    <Tag>
                        <id>101271291</id>
                        <name>Unassigned Business Unit</name>
                    </Tag>
                </tags>
            </createdBy>
            <updatedBy>
                <id>89375990</id>
                <uuid>76fcec21-f674-4e17-a868-801f7a92c35c</uuid>
                <firstName>api-user</firstName>
                <lastName>api-user</lastName>
                <company>afko</company>
                <emailAddress>user@email.com</emailAddress>
                <userName>user</userName>
                <title>dev</title>
            </updatedBy>
            <assignedTo>
                <id>89375990</id>
                <uuid>76fcec21-f674-4e17-a868-801f7a92c35c</uuid>
                <firstName>john</firstName>
                <lastName>doe</lastName>
                <company>afko</company>
                <emailAddress>user@email.com</emailAddress>
                <userName>user</userName>
            </assignedTo>
            <responder>
                <id>71077390</id>
                <uuid>97318a7b-85a8-466d-8071-597cde68e1b4</uuid>
                <firstName>resonder1</firstName>
                <lastName>doe</lastName>
                <company>afko</company>
                <emailAddress>user@email.com</emailAddress>
                <userName>user</userName>
                <title>responder</title>
            </responder>
            <originalAssignedTo>
                <id>71077390</id>
                <uuid>97318a7b-85a8-466d-8071-597cde68e1b4</uuid>
                <firstName>responder1</firstName>
                <lastName>doe</lastName>
                <company>afko</company>
                <emailAddress>user@email.com</emailAddress>
                <userName>user</userName>
                <title>tag1</title>
            </originalAssignedTo>
            <campaign>
                <id>656002</id>
            </campaign>
            <maxPossibleScore>0</maxPossibleScore>
            <score>0</score>
            <state>APPROVAL</state>
            <progress>
                <total>14</total>
                <unanswered>0</unanswered>
                <answered>14</answered>
                <delegated>0</delegated>
                <qaacceptedQuestions>14</qaacceptedQuestions>
            </progress>
        </Questionnaire>
    </data>
</ServiceResponse> 

XSDXSD

<platform API server>/qps/xsd/1.0/saq/questionnaire.xsd