DX Netops 20.2 p4 the API to manage users groups does not work.
search cancel

DX Netops 20.2 p4 the API to manage users groups does not work.

book

Article ID: 202423

calendar_today

Updated On:

Products

CA Infrastructure Management CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

The user I am trying to manage from the API.

<user>
<userId>269</userId>
<permissionId>761900</permissionId>
<defaultGroupId>761900</defaultGroupId>
<name>[email protected]</name>
<description>A GHLHM Customer</description>
<enabled>true</enabled>
<removable>true</removable>
<email>[email protected]</email>
<timezone>America/Edmonton</timezone>
<authenticationType>PRODUCT</authenticationType>
<role>
 
User's current groups from the API.
<groups>
<group ID="761900" Name="GA"/>
</groups>
 
The group.xml file I am trying to use to update.  I have tried <groups></groups> as was the old way, and the way below that is listed in the documentation.
<group>
        <group ID="9801155"/>
        <group ID="9802263"/>
</group>
 
Commands I have tried to get to the users groups to update.
 
[[email protected] UserMaker]# curl -X put --user GA_admin:password http://paws-ore-performance-center-capm.axiacloud.org:8181/pc/center/webservice/users/userName/[email protected]/269/groups -H "Content-Type: application/xml" -T "add_group.xml"
[[email protected] UserMaker]# curl -X put --user GA_admin:password http://paws-ore-performance-center-capm.axiacloud.org:8181/pc/center/webservice/users/userName/[email protected]/269/addgroups -H "Content-Type: application/xml" -T "add_group.xml"
[[email protected] UserMaker]# curl -X put --user GA_admin:password http://paws-ore-performance-center-capm.axiacloud.org:8181/pc/center/webservice/users/[email protected]/269/groups -H "Content-Type: application/xml" -T "add_group.xml"
No user found for ID name: [email protected] and ID value: 269[[email protected] UserMaker]#
[[email protected] UserMaker]# curl -X put --user GA_admin:password http://paws-ore-performance-center-capm.axiacloud.org:8181/pc/center/webservice/users/[email protected]/269/addgroups -H "Content-Type: application/xml" -T "add_group.xml"
[[email protected] UserMaker]#
 
The documentation does not have /userName/ as part of the path, but that was the old way, and if you leave it out it errors out.
 
 
 
In PCService.log
WARN  | qtp547084527-7008        | 2020-10-28 13:56:03,250 | org.apache.cxf.jaxrs.utils.JAXRSUtils                            
      | No operation matching request path "/pc/center/webservice/users/userName/[email protected]/12628824/addGroups" is found, Relative Path: /userName/[email protected]/12628824/addGroups, HTTP Method: PUT, ContentType: application/xml, Accept: */*,. Please enable FINE/TRACE log level for
 
 
 
 
 
 
 
 

Environment

Release : 20.2

Component : IM Reporting / Admin / Configuration

Cause

addGroups URL should be:

/pc/center/webservice/users/userName/[email protected]/addGroups

NOT:

/pc/center/webservice/users/userName/[email protected]/12628824/addGroups

Resolution

add /userName/ to the path but remove the userid, as follows

/pc/center/webservice/users/userName/[email protected]/addGroups