Delete Users in Bulk API

Use this API to delete multiple users in the API user’s scope.

POST  /qps/rest/1.0/update/saq/user/

Permissions

User must have the Security Assessment Questionnaire (SAQ) module enabled, User must have API ACCESS permission, Output includes users 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.

Parameters Mandatory/Optional Data Type Description Allowed Operators
id Optional Integer  ID of the user EQUALS, IN
uuid Optional Integer Unique ID of the user EQUALS
firstName Optional Text First name of the user CONTAINS, EQUALS
lastName Optional Text Last name of the user  CONTAINS, EQUALS
company Optional Text Company of the user CONTAINS, EQUALS
title Optional Text Title of the user CONTAINS, EQUALS
emailAddress Optional Text Email address of the user CONTAINS, EQUALS
userName Optional Text User name of the User

CONTAINS, EQUALS

tags.tag.id Optional Integer Tag id applied to the user EQUALS, IN
tags.tag.name Optional Text Tag name applied to the user CONTAINS, EQUALS

Sample - Delete User in BulkSample - Delete User in Bulk

API Request

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

 

Request POST Data

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

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/user.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>49</count>
    <data>
        <User>
            <id>767231594</id>
        </User>
        <User>
            <id>767231600</id>
        </User>
        '
        '
        '
        '
        '
       <User>
            <id>796615798</id>
        </User>
        <User>
            <id>796615801</id>
        </User>
        <User>
            <id>800134591</id>
        </User>
        <User>
            <id>800955391</id>
        </User>
        <User>
            <id>801690392</id>
        </User>
    </data>
</ServiceResponse>

XSDXSD

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