Current Campaign Count API

Returns the total number of campaigns in the API user’s scope.

 GET  POST /qps/rest/1.0/count/saq/questionnairecampaign/

Permissions

The users must have the Security Assessment Questionnaire (SAQ) module enabled, users must have API access, and Access SAQ module permissions. The campaign must be within the API user's scope.

Input ParameterInput Parameter

The following input elements are optional and act as filters. When specified POST must be used. Multiple filters 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. For example, <Criteria field="id" operator="EQUALS">1234</Criteria>
name Optional String Name of the campaign. Supports "EQUALS" and "CONTAINS" operators. For example, <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. For example, <Criteria field="status" operator="EQUALS">ACTIVE</Criteria>
workflow Type Optional String Workflow type of the campaign. The values are SIMPLE, REVIEWABLE, FULL. Supports "EQUALS" and "IN" operators. For example, <Criteria field="workflowType" operator="EQUALS">FULL</Criteria>

Sample - Get Campaign CountSample - Get Campaign Count

API Request

 curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST"--data-binary @-
"https://<qualysbaseurl>/qps/rest/1.0/count/saq/questionnairecampaign/"<file.xml
Note: "file.xml" contains the request POST data. 

 

Request POST Data

  <?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
    <filters>
        <Criteria field="status" operator="EQUALS">COMPLETE</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>35</count>
</ServiceResponse> 

XSDXSD

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