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

How to get the llist of all users in JTS via REST

Hi,

This (or similar) question appears to have been asked before but there doesn't seem to be any satisfactory answer.

I am writing a program to bulk manipulate user membership/roles within project and team areas. I need to be able to check if the users already exist in CLM.

It is possible to check each user id by check result of "https://localhost:9443/jts/users/xxx" but this is tedious (and the URL may change in future?) (REST says only ever get resource url by getting from the attribute?)

So ideally, I retrieve list of all users and user-url from jts and use hash to check user.

I tried to get the list of users via (accept:application/rdf+xml and oslc-core-version:2.0) https://localhost:9443/jts/rootservices -> <jfs:users rdf:resource="https://localhost:9443/jts/users" />
But I get: a 405

  1. Status Code: 405 Method Not Allowed
  2. x-powered-by: Servlet/3.0
  3. x-com-ibm-team-scenario: 9.145.184.217
  4. Content-Type: text/html;charset=UTF-8
  5. Content-Language: en-US
  6. Transfer-Encoding: chunked
  7. Connection: Close
  8. Date: Mon, 05 Feb 2018 12:06:48 GMT

accepting xml, rdf, rdf+xml produce same result.



0 votes

Comments

I don't know what service you need, but "https://localhost:9443/jts/users" does not seem to be designed to return a list of users. If you leave out the user ID e.g. admin in the example, "https://localhost:9443/jts/users/admin"the service tells you that this call is not allowed. This indicates your assumption of using it that way is incorrect.

Thanks Ralph.
Perhaps a more to the point question
is there any way of return the full list of users in CLM to include "userid", "user name" and "user-url" using REST.



One answer

Permanent link

There are a number of similar posts over forum which may help you:

https://jazz.net/forum/questions/223363/using-the-rest-api-how-would-i-find-all-rtc-projects-all-users-on-each-rtc-project-and-all-the-user-roles-including-admin-for-each-user-on-each-rtc-project

https://jazz.net/forum/questions/109593/oslc-user-list

https://jazz.net/forum/questions/112154/get-list-of-users-rest

0 votes

Comments

OK, I see that nothing will return a list of all users with id, name and user-url.
I need to manipulate (

oops...
I need to manipulate user role assignments etc (see https://jazz.net/library/article/633, and https://jazz.net/wiki/bin/view/Main/DraftTeamProcessRestApi), I would much rather get the user-url from CLM REST (and no, using jazz api is not an option, since it works only for ccm and I need it to work for ccm, rm and qm).

I suppose I have to manufacture the user url myself.

It is strange that there are solutions for problems using information that is not obtainable using same mechanism.

Anyway, thanks for all your effort.

The basic User, Project Area API is the same for RTC, RM, QM, JTS:

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
× 12,020
× 7,497
× 137

Question asked: Feb 05 '18, 7:10 a.m.

Question was seen: 4,361 times

Last updated: Feb 06 '18, 2:12 a.m.

Confirmation Cancel Confirm