Create a Template from the Library API

Use this API to create a new template from an existing library template.  

Permissions

 User must have the Security Assessment Questionnaire (SAQ) module enabled, User must have API ACCESS, Access SAQ module, Questionnaire Invite and Questionnaire Template Create permissions

POST  qps/rest/1.0/createfromlibrary/saq/template/

Input ParameterInput Parameter

The “id” element is the library template ID you’ll use to create a new template, and is provided as request POST data.

Sample - Create Template From LibrarySample - Create Template From Library

API Request

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

Request POST Data

 <?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
    <data>
        <Template>
            <id>42768</id> <!- the ID of the Library Template->
        </Template>
    </data>
</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/template.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <data>
        <Template>
            <id>102168</id>
            <uuid>61bf3412-fa27-4693-9a6b-12e5ce7d9d4a</uuid>
            <name>Copy of New UCF (42 questions)</name>
            <familyId>52ffcc68-54ef-4499-a7b8-ff1385f9d488</familyId>
            <revision>1</revision>
            <isLibrary>false</isLibrary>
            <questionCnt>42</questionCnt>
            <state>DRAFT</state>
            <elements>
                <sections>
                    <list>
                        <Section>
                            <name>1 Detective</name>
                            <sections/>
                            <questions>
                                <list>
                                    <Question>
                                        <label>1.1</label>
                                        <text>&lt;span style=&quot;font-family: Arial;&quot;&gt;Examine the &lt;/span&gt;
&lt;span style=&quot;font-family: Arial;font-style: italic;&quot;&gt;Monitoring and Logging operations&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt; checklist. Is the control entitled &lt;/span&gt;
&lt;span style=&quot;font-family: Arial;text-decoration: underline;&quot;&gt;Review audit logs, Intrusion Detection System reports, security incident tracking reports, and other security logs regularly&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt; [UCF CE ID 00596] included in it?&lt;/span&gt;</text>
                                        <type>booleanQuestion</type>
                                        <mode>BUTTON</mode>
                                        <requireAttachment>false</requireAttachment>
                                        <requireComment>false</requireComment>
                                        <requireAsset>false</requireAsset>
                                    </Question>
                                    <Question>
                                        <label>1.2</label>
                                        <text>&lt;span style=&quot;font-family: Arial;&quot;&gt;Interview a sample of people in the role of &lt;/span&gt;
&lt;span style=&quot;font-family: Arial;font-style: italic;&quot;&gt;Perform Security Administration&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt; about the control entitled &lt;/span&gt;
&lt;span style=&quot;font-family: Arial;text-decoration: underline;&quot;&gt;Review audit logs, Intrusion Detection System reports, security incident tracking reports, and other security logs regularly&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt; [UCF CE ID 00596]. Does this verify log reviews are performed for all system components?&lt;/span&gt;</text>
                                        <type>booleanQuestion</type>
                                        <mode>BUTTON</mode>
                                        <requireAttachment>false</requireAttachment>
                                        <requireComment>false</requireComment>
                                        <requireAsset>false</requireAsset>
                                    </Question>
                                    <Question>
                                        <label>1.3</label>
                                        <text>&lt;span style=&quot;font-family: Arial;&quot;&gt;Examine the sample of &lt;/span&gt;
&lt;span style=&quot;font-family: Arial;font-style: italic;&quot;&gt;Hosting Service Provider Security Standards records&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt; associated with the control entitled &lt;/span&gt;
&lt;span style=&quot;font-family: Arial;text-decoration: underline;&quot;&gt;Review audit logs, Intrusion Detection System reports, security incident tracking reports, and other security logs regularly&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt; [UCF CE ID 00596] in the &lt;/span&gt;
&lt;span style=&quot;font-family: Arial;font-style: italic;&quot;&gt;Monitoring and Logging operations&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt; checklist. Does this verify verify that viewing of log entries is restricted to the owning entity?&lt;/span&gt;</text>
                                        <type>booleanQuestion</type>
                                        <mode>BUTTON</mode>
                                        <requireAttachment>false</requireAttachment>
                                        <requireComment>false</requireComment>
                                        <requireAsset>false</requireAsset>
                                    </Question>
                                    <Question>
                                        <label>1.4</label>
                                        <text>&lt;span style=&quot;font-family: Arial;&quot;&gt;Examine the sample of &lt;/span&gt;
&lt;span style=&quot;font-family: Arial;font-style: italic;&quot;&gt;Audit Logs records&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt; associated with the control entitled &lt;/span&gt;
&lt;span style=&quot;font-family: Arial;text-decoration: underline;&quot;&gt;Review audit logs, Intrusion Detection System reports, security incident tracking reports, and other security logs regularly&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt; [UCF CE ID 00596] in the &lt;/span&gt;
...
</Section>
                    </list>
                </sections>
                <questions/>
            </elements>
        </Template>
    </data>
</ServiceResponse> 

XSDXSD

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