Use this API to search for campaigns using specified filters.
The user must have the Security Assessment Questionnaire (SAQ) module enabled, the User must have API ACCESS permission, and the Output include campaigns within the API user's scope. The campaign must be within the API user's scope.
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 | Integer | Id of the campaign. | Supports "EQUALS" and "IN" operators. <Criteria field="id" operator="EQUALS">1234</Criteria> |
name | Optional | String | name of the campaign. | Supports "EQUALS" and "CONTAINS" operators. <Criteria field="name" operator="EQUALS">campaign 1</Criteria> |
status | Optional | String | Status of the campaign. The values are ACTIVE, INACTIVE, COMPLETE, CANCELED. | Supports "EQUALS" and "IN" operators. <Criteria field="status" operator="EQUALS">ACTIVE</Criteria> |
workflow Type | Optional | String | Workflow type of the campaign. The values are VERY_HIGH, HIGH, MEDIUM, LOW. | Supports "EQUALS" and "IN" operators. <Criteria field="workflowType" operator="EQUALS">LOW</Criteria> |
API Request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST"--data-binary @-
"https:// <qualysbaseurl>/qps/rest/1.0/search/saq/questionnairecampaign/"<file.xml
Note: "file.xml" contains the request POST data.
Request POST Data
<ServiceRequest>
<filters>
<Criteria field="name" operator="EQUALS">NCSC Basic Cyber Security Controls (BCSC) Version 1.0</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/questionnairecampaign.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<hasMoreRecords>false</hasMoreRecords>
<data>
<QuestionnaireCampaign>
<id>565002</id>
<name>NCSC Basic Cyber Security Controls (BCSC) Version 1.0</name>
<workflowType>SIMPLE</workflowType>
<status>CANCELED</status>
<comments>demo api cancel </comments>
<created>2019-10-21T04:58:50Z</created>
<updated>2019-10-23T10:45:26Z</updated>
<launchDate>2019-10-21T04:58:57Z</launchDate>
<template>
<id>624001</id>
<name>NCSC Basic Cyber Security Controls (BCSC) Version 1.0</name>
<questionCnt>135</questionCnt>
</template>
<user>
<id>70596886</id>
<uuid>3d124658-8f4f-771d-806d-1e18a04a1acf</uuid>
<firstName>api-user</firstName>
<lastName>api-user</lastName>
<emailAddress>user@email.com</emailAddress>
<userName>user</userName>
<title>dev</title>
<tags>
<Tag>
<id>101271291</id>
<name>Unassigned Business Unit</name>
</Tag>
</tags>
</user>
<campaignNotification>
<reminderNotification>
<enabled>false</enabled>
<interval>1</interval>
<noOfDays>1</noOfDays>
</reminderNotification>
<overdueNotification>
<enabled>false</enabled>
<interval>1</interval>
<noOfDays>1</noOfDays>
</overdueNotification>
<dueDateNotification>
<enabled>false</enabled>
<interval>1</interval>
<noOfDays>1</noOfDays>
</dueDateNotification>
</campaignNotification>
</QuestionnaireCampaign>
</data>
</ServiceResponse>
<platform API server>/qps/xsd/1.0/saq/questionnairecampaign.xsd