Create Role
Use this API to create a new role.
Input ParametersInput Parameters
|
Parameter |
Mandatory/Optional |
Data Type |
Description |
|---|---|---|---|
|
name |
Optional |
String |
Specify the role name. |
|
description
|
Optional
|
String
|
Specify the description. |
|
permissionNames |
Mandatory |
String |
Specify the permission name. |
|
permissionIds
|
Mandatory |
Integer |
Specify the permission Id. |
The API request and response are in JSON format. Some characters, such as backslash (\) and double quotes (") in passwords or other fields may appear escaped in raw JSON responses. It is recommended to alway as parse responses using standard JSON parser to retrieve the correct values.
Sample - Create New RoleSample - Create New Role
API request
curl --location --request POST '<qualys_base_url>/adminui/role-management/v1/roles' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT_token>' \
--data '{
"name":"Create New Role",
"description":"My Role description",
"permissionIds":[228,229],
"permissionNames":["UI.ACCESS", "WAS.OPTIONPROFILE.CREATE", "MODULE_CODE.ACCESS"]
}'
- The permissionsIds or permissionNames should be referred from the Id and permissionName from the Get Permission List API Response. For more information, see Permissions List.
- The MODULE_CODE.ACCESS permission is mandatory for the application to be accessible. Specify the application name to which you want to grant the permission.
For example: permissionNames: ["ETM.ACCESS"]
| Module Code | Application Name |
|---|---|
| MDS | Web Malware Detection |
| SECURESEAL | SECURE Seal |
| QWEB_PC | Policy Compliance / Policy Audit |
| ETM | Enterprise TruRisk Management |
| SECURITY_ANALYTICS | XDR |
| WAS | Web Application Scanning |
| SM | Custom Access Remediation |
| WAF | Web Application Firewall |
| CS | Container Security |
| SAC | Secure Access Control |
| SSC | Saas Detection and Response |
| CERTVIEW | Certificate View |
| ISL | Isolation |
| UD | Unified Dashboard |
| TA | TotalAI |
| MOBILITY | Mobility |
| PS | Network Passive Sensor |
| QUESTIONNARE | Security Assessment Questionnaire |
| ADMIN | Administration |
| CM | Continous Monitoring |
| CA | Cloud Agent |
| ITAM | Global AssetView / CSAM |
| ICS | VMDR Operational Technology |
| LM | Log Manager |
| THREAT_PROTECT | Threat Protection |
| SEM | VMDR Mobile |
| TC | TotalCloud / CLOUDVIEW |
| PM | Patch Management |
| QWEB_VM | Vulnerability Management |
| FIM | File Integrity Management |
| MPS | Malware Protection Services |
| EXP | Exploitation Services |
| MTG | Mitigation |
| OCA | Out-of-Band Configuration Assessment |
| QGS | Qualys Gateway Service |
| QFLOW | Qulays Flow |
| IOC | Endpoint Detection and Response |
Response
{
"id": 8962615,
"name": "Create New Role",
"status": "SUCCESS"
}