DNG REST API for users and permissions?
Accepted answer
Michael,
with the REST API, you can extract some informations :
- list of projects
https://<server>:<port>/ccm/process/project-areas
- for each project, list of users
https://<server>:<port>/ccm/process/project-areas/<prjid>/members
- for each user, roles and status
roles : https://server:port/ccm/process/project-areas/<project_id>/members/<user_id>/role-assignments
status : https://server:port/jts/users/<user_id>
We have a small Perl script to do this extraction (we can share it, for example and help the Jazz users).
Regards
Comments
you're example URLs show "ccm", will these work for "rm"?
Yes, the example works for "rm" ...
We have a small Perl script to do this extraction (we can share it, for example and help the Jazz users).
@jchapelle77 how do you pass authentication with Perl?
my $userAgent = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 },
protocols_allowed => ['https'],
timeout => 1200);
my $http_request = HTTP::Request->new();
my $http_response = HTTP::Response->new();
$http_request->method('POST');
$http_request->uri($srvurl.'/j_security_check?j_username='.$authkey->{USER}.'&j_password='.$authkey->{PASSWORD});
$userAgent->cookie_jar({ file => "./jazz_cookies.txt"});
$http_response = $userAgent->request($http_request);
if ( $http_response->code eq "302" && $http_response->header('location') =~ m/\/auth\/authfailed/ || $http_response->code ne "302") = connect is failed
One other answer
I would be very interested in seeing how to programmatically retrieve details from "https://server:port/jts/users/<user_id>" (since it returns the html page with ajax calls).
thanks.