Netskope Help

Create a User Role

This endpoint creates user roles with defined privileges.

Request Endpoint
https://<tenant-name>.goskope.com/api/v1/role?token=<token>&op=create

Valid parameters are:

Key

Type

Value

Description

op

string

create

Required. Operation performed.

role_name

string

Ex:

admin | user | analyst

Required. Specifies role to be created. 

role_description

string

Ex:

User with view only privileges

Required. Describes the role and abilities.

privelege

array

{ name: 'administrators', value: 'edit'},

{ name: 'threat', value: 'view'},

{ name: 'reports', value: 'none'},

{ name: 'policies', value: 'apply'}

Required. Specifies functional areas with privilege value.

file_download

string

true |false Default is false.

Optional. Allows admins to download, preview and view files from API-enabled Protection and Incident Management

obfuscate

array

{ name: 'user', value: true},

{ name: 'userip', value: false},

{ name: 'source', value: true},

{ name: 'file', value: false}

Optional. Allows obfuscating file names and values.

Example Create User Role Request
POST 'https://&lt;tenant>/api/v1/role?token=token&op=create' \
--header 'Content-Type: application/json' \
--data-raw '{
  "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
    }
  ]
}'