How to export user accounts from CAPC 2.x 3.x

Document ID : KB000010018
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

How to export user accounts from CAPC 2.x 3.x

Environment:
CAPM any version
Instructions:

Here is how you would get a list of users:

http://<pc>:8181/pc/center/webservice/users/en-US


You will likely have to massage that data to get it into your other system. In general here is how you can do it:

Fetch a role for the user
1. Issue a HTTP GET to http://<pchost>:8181/pc/center/webservice/roles/en-US
2. Note a role name of an available role. Call it “userRoleName”.
Create the user
1. Issue a HTTP POST to http://<pchost>:8181/pc/center/webservice/users/role/roleName/{userRoleName} using the following content:
- Replace {roleName} in the URL with the value from the previous step.
- Replace {newUserName} with a new user name.
Headers:
Content-Type: application/xml
Body:
<user>
<name>{newUserName}</name>
<description>My new user</description>
<enabled>true</enabled>
<removable>false</removable>
<timezone>UTC</timezone>
<authenticationType>PRODUCT</authenticationType>
<culture>en-US</culture>
<customGroups>false</customGroups>
<suppressViews>false</suppressViews>
</user>