Current User Count API
Use this API to get the total number of users in the API user’s scope.
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 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 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 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 - Get User CountSample - Get User Count
API Request
curl -u "<username>:<password>"
-X "GET" "<qualys_base_url>/qps/rest/1.0/count/saq/user"
Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/1.0/saq/user.xsd">
<responseCode>SUCCESS</responseCode>
<count>28</count>
</ServiceResponse>
Sample - Get User Count With FiltersSample - Get User Count With Filters
API Request
curl -u "<username>:<password>"
-H "content-type: text/xml"
-X "POST" --data-binary @- "<qualys_base_url>/qps/rest/1.0/count/saq/user" < file.xml
Note: "file.xml" contains the request POST data.
Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
<filters>
<Criteria field="company" operator="CONTAINS">abc</Criteria>
</filters>
</ServiceRequest>
Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/1.0/saq/user.xsd">
<responseCode>SUCCESS</responseCode>
<count>5</count>
</ServiceResponse>
XSDXSD
<platform API server>/qps/xsd/1.0/saq/user.xsd