Use this API to get the total number of users in the API user’s scope.
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.
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 |
API Request
curl -u "USERNAME:PASSWORD" -X "GET" "https://<qualysbaseurl>/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="http://<qualysbaseurl>/qps/xsd/1.0/saq/user.xsd">
<responseCode>SUCCESS</responseCode>
<count>28</count>
</ServiceResponse>
API Request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @- "https:// <qualysbaseurl>/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="http://<qualysbaseurl>/qps/xsd/1.0/saq/user.xsd">
<responseCode>SUCCESS</responseCode>
<count>5</count>
</ServiceResponse>
<platform API server>/qps/xsd/1.0/saq/user.xsd