Create a User Role
This endpoint creates user roles with defined privileges.
https://<tenant-name>.goskope.com/api/v1/role?op=createValid parameters are:
Key | Type | Value | Description |
|---|---|---|---|
| string | Ex:
| Required. The token obtained from the REST API page in the Netskope UI ( Settings > Tools > Rest API v1) is required. We recommend that you place the token in the body of the request, not in the endpoint URL. |
| string |
| Required. Operation performed. |
| string | Ex:
| Required. Specifies role to be created. |
| string | Ex:
| Required. Describes the role and abilities. |
| array |
| Required. Specifies functional areas with privilege value. |
| string |
| Optional. Allows admins to download, preview and view files from API-enabled Protection and Incident Management |
| array |
| Optional. Allows obfuscating file names and values. |
POST 'https://<tenant>/api/v1/role?op=create' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "f32a973eddd7bc1602fc0f48dc0a",
"role_name": "Netskope Role",
"role_desc": "Role Description",
"privilege": [
{
"name": "administrators",
"value": "view"
},
{
"name": "threat",
"value": "edit"
}
],
"scope_query": "user eq '13-38-20@prodauto.local'",
"file_download": true,
"obfuscate": [
{
"name": "user",
"value": true
},
{
"name": "userip",
"value": true
}
]
}'