Current Library Template Count API

Use this API to return the total number of library templates in the API user’s scope.

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

Permissions

The user must have the Security Assessment Questionnaire (SAQ) module enabled, the user must have API ACCESS permission, and the Output include templates 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 template EQUALS, IN
uuid Optional  Integer Unique id of the template EQUALS
name Optional  Text Name of template CONTAINS, EQUALS
description  Optional  Text Description of template CONTAINS, EQUALS
category  Optional  Text Category of the template CONTAINS, EQUALS
familyId Optional  Integer Family identifier of the template. EQUALS
revision Optional  Integer Version of the template. EQUALS, IN
isLibrary Optional  Boolean  True if the template is created from a library template. EQUALS
questionCnt  Optional  Integer Count of questions in a template.

EQUALS, IN

state  Optional  Text  State of the template (Published, Draft) EQUALS, IN

Sample - Get Library Template CountSample - Get Library Template Count

API Request

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

Response

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://qualysapi.p01.eng.sjc01.qualys.com/qps/xsd/1.0/saq/librarytemplate.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>283</count>
</ServiceResponse>

POST Data Request

<?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
    <filters>
        <Criteria field="name" operator="CONTAINS">GDPR</Criteria>
    </filters>
</ServiceRequest>

Response- POST

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://qualysapi.p01.eng.sjc01.qualys.com/qps/xsd/1.0/saq/librarytemplate.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>8</count>
</ServiceResponse>

XSDXSD

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