It's all about the answers!

Ask a question

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


Cliff Gardiner (921234) | asked May 24 '16, 4:33 a.m.
edited Jun 01 '16, 11:32 p.m. by David Lafreniere (4.8k7)

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?

Accepted answer


permanent link
Ralph Schoon (63.7k33648) | answered Jun 02 '16, 2:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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

Comments
Cliff Gardiner commented Jun 02 '16, 11:05 a.m. | edited Jun 02 '16, 4:09 p.m.

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.


David Lafreniere commented Jun 02 '16, 4:11 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

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


Ralph Schoon commented Jun 03 '16, 2:10 a.m. | edited Jun 03 '16, 2:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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