Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?

1

0 votes


Accepted answer

Permanent link

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).

But, nothing about the permissions.

Regards


M K selected this answer as the correct answer

0 votes

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

Permanent link
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.

0 votes

Comments

Set the request header "Accept: application/rdf+xml" 

 thanks.  that worked.

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 478
× 137
× 18

Question asked: Oct 24 '19, 4:57 a.m.

Question was seen: 3,627 times

Last updated: Aug 11 '20, 5:26 p.m.

Confirmation Cancel Confirm