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

REST / OSLC - How to find the Repository Workspaces for a stream?

CLM 4.0.7

I need to be able to list the repository workspaces flowing to a stream.  I can list streams via the REST query https://server:port/ccm/rpt/repository/scm?fields=scm/workspace[stream='true']/*/* and list repository workspaces from https://server:port/ccm/rpt/repository/scm?fields=scm/workspace[stream='false']/*/* but I can't see how to list the repo workspaces for a given stream.

It would also be useful to be able to list all the repository workspaces for a user, but I can't work out the syntax for that query either.

Can anybody help?

0 votes


Accepted answer

Permanent link
There is no 1 to N relationship between streams and repository workspace. There is a M:N relationship, where M,N a positive natural number or 0.

Given that, I assume you would have to iterate all repository workspaces and check if they have a flow target identical with the stream.

It is likely doable with the Java API. I don't know the REST/OSLC API enough to talk about that.
David Lafreniere selected this answer as the correct answer

0 votes

Comments

Thanks Ralph, and I've concluded after talking with the team that the possible benefit isn't worth the programming effort.  I was hoping there might be a simple way of querying according to flow target itemId but it looks like this won't be possible without a lot of looping, storing stuff, requerying and so on.

The aim was to help deal with users who create multiple repo workspaces, often with the same names and often private, flowing to their working stream. 

We have other, bigger problems to address so I'll park this for now.

 I can confirm there is no built-in REST/OSLC API to get exactly what you are asking for.

You are aware that you can use the flow diagram feature in Eclipse? To find the repo workspaces that flow into a stream you can expand the flow sources and show the owner. This is something an admin could do.
 
You could also use an advanced setting and show all repo workspaces of a user (for a stream that is shown due to a loaded repo workspace) in the Eclipse pending changes view. This would be how a single user does it. You are aware of that?

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
× 10,937
× 1,202
× 516

Question asked: May 24 '16, 4:33 a.m.

Question was seen: 3,377 times

Last updated: Jun 03 '16, 2:16 a.m.

Confirmation Cancel Confirm