How to create a user and set access permissions through rest
search cancel

How to create a user and set access permissions through rest

book

Article ID: 272509

calendar_today

Updated On:

Products

DX NetOps CA Performance Management - Usage and Administration

Issue/Introduction

How can I create a user and set access permissions through rest

Environment

Dx NetOps Performance Management any version

Resolution

Create a User
-------------
"POST": https://<capc>:8182/pc/center/webservice/users/role/roleName/Administrator/

<user>
<name>Test</name>
<description>Test user</description>
<enabled>true</enabled>
<removable>true</removable>
<timezone>UTC</timezone>
<culture>en-US</culture>
</user>

This would create user Test as an Administrator. 

Get a group list
----------------
https://<capc>:8182/pc/center/webservice/groups/groupPath/All%20Groups/

 

Now pick a group you want to update the user access permissions with.  For example
----------------------------------------------------------------------------------
Example:

<group ID="19427" Name="AppNeta"/>


Update the user permissions
---------------------------
"PUT" https://<capc>:8182/pc/center/webservice/users/userName/Test/groups

<?xml version="1.0" encoding="UTF-8"?>
<groups>
    <group ID="19427" Name="AppNeta"/>
</groups>

.... you could add multiple groups to this list


Now you must set the default group
----------------------------------
https://<portal>:8182/pc/center/webservice/users/userName/Test/defaultGroup/19427

.... in this example we use the 1 group id.  But if there are multiple groups in the list as per the previous step you have to pick 1 id from the list to set the default group