DNG REST API for users and permissions?
Is it possible to use the DNG REST API to get a list of users, the roles they have, and the permissions per role?
EDIT: also teams and members of teams?
|
Accepted answer
Michael,
with the REST API, you can extract some informations :
- list of projects
- for each project, list of users
- for each user, roles and status
We have a small Perl script to do this extraction (we can share it, for example and help the Jazz users).
Regards
M K selected this answer as the correct answer
Comments
M K
commented Oct 24 '19, 5:23 a.m.
you're example URLs show "ccm", will these work for "rm"?
Jean-François CHAPELLE
commented Oct 24 '19, 7:49 a.m.
Yes, the example works for "rm" ...
@jchapelle77 how do you pass authentication with Perl?
Jean-François CHAPELLE
commented Nov 12 '19, 12:27 p.m.
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.
Comments
Kirk Woods
commented Aug 11 '20, 12:15 p.m.
Set the request header "Accept: application/rdf+xml"
Aaron Duncan
commented Aug 11 '20, 5:26 p.m.
thanks. that worked.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.