Search Users API

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

 POST  /qps/rest/1.0/search/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.

Parameter 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's work profile 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 - Search UserSample - Search User

API Request

curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @- "http://<qualysbaseurl>/qps/rest/1.0/search/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="id" operator="EQUALS">400591</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/user.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>1</count>
    <hasMoreRecords>false</hasMoreRecords>
    <data>
        <User>
            <id>400591</id>
            <uuid>2277d4ff-9068-44f2-97d0-ccf35cfa1679</uuid>
            <firstName>user</firstName>
            <lastName>q</lastName>
            <company>abc</company>
            <emailAddress>user@abc.com</emailAddress>
            <title>dev</title>
            <tags>
                <Tag>
                    <id>7513412</id>
                    <name>Malware Domain Assets</name>
                </Tag>
                <Tag>
                    <id>7533412</id>
                    <name>fadi&apos;s tag</name>
                </Tag>
                <Tag>
                    <id>7508422</id>
                    <name>Business Units</name>
                </Tag>
                <Tag>
                    <id>7520414</id>
                    <name>test2</name>
                </Tag>
                <Tag>
                    <id>7546412</id>
                    <name>Passive Scanning</name>
                </Tag>
                <Tag>
                    <id>7553612</id>
                    <name>tag1</name>
                </Tag>
                <Tag>
                    <id>7553812</id>
                    <name>tag2</name>
                </Tag>
            </tags>
        </User>
    </data>
</ServiceResponse> 

XSDXSD

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