Use this API to add a new user to the API user’s scope.
User must have the Security Assessment Questionnaire (SAQ) module enabled, User must have API ACCESS permission.
Parameter | Optional/Mandatory | Data Type | Description | Allowed Operators |
firstName | Mandatory | Text | First name of the user | CONTAINS, EQUALS, NOT EQUALS |
lastName | Mandatory | Text | Last name of the user | CONTAINS, EQUALS, NOT EQUALS |
company | Mandatory | Text | Company of the user | CONTAINS, EQUALS, NOT EQUALS |
emailAddress | Mandatory | Text | Email Address of the user | CONTAINS, EQUALS, NOT EQUALS |
title | Optional | Text | Title of the user | CONTAINS, EQUALS, NOT EQUALS |
lastScanned | ||||
tags | Optional | Text | Tags applied to the user | CONTAINS, EQUALS, NOT EQUALS |
tags.tag.name | Optional | Text | Tag name applied to the user | tags.tag.name |
API Request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST"
--data-binary @-
"http://<qualysbaseurl>/qps/rest/1.0/create/saq/user" < file.xml
Note: "file.xml" contains the request POST data.
Request POST Data
<?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
<data>
<User>
<firstName>user</firstName>
<lastName>user</lastName>
<company>abc</company>
<emailAddress>user@abc.com</emailAddress>
</User>
</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/user.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<data>
<User>
<id>401990</id>
<uuid>734d9b3d-d246-4bb6-a028-5a390b47eb2a</uuid>
<firstName>user</firstName>
<lastName>user</lastName>
<company>qualys</company>
<emailAddress>user@abc.com</emailAddress>
</User>
</data>
</ServiceResponse>
API Request
curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST"
--data-binary @-
"http://qualysapi.qualys.com/qps/rest/1.0/create/saq/user" < file.xml
Note: "file.xml" contains the request POST data.
Request POST Data
<?xml version="1.0" encoding="UTF-8"?>
<ServiceRequest>
<data>
<User>
<firstName>abc-user</firstName>
<lastName>xyz-user</lastName>
<company>abc</company>
<emailAddress>user@abc.com</emailAddress>
</User>
<User>
<firstName>User</firstName>
<lastName>pqr</lastName>
<company>abc</company>
<emailAddress>user2@abc.com</emailAddress>
</User>
</data>
</ServiceRequest>
Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://qualysapi.qualys.com/qps/xsd/1.0/saq/user.xsd">
<responseCode>SUCCESS</responseCode>
<count>2</count>
<data>
<User>
<id>404591</id>
<uuid>328ea575-fc9d-4562-aa28-c97e7ba5482f</uuid>
<firstName>abc-user</firstName>
<lastName>xyz-user</lastName>
<company>abc</company>
<emailAddress>user@abc.com</emailAddress>
<userName>user</userName>
</User>
<User>
<id>404592</id>
<uuid>4f6c65b6-e877-43fe-9b45-50993235f60e</uuid>
<firstName>User</firstName>
<lastName>pqr</lastName>
<company>abc</company>
<emailAddress>user2@abc.com</emailAddress>
<userName>user2</userName>
</User>
</data>
</ServiceResponse>
<platform API server>/qps/xsd/1.0/saq/user.xsd