REST / OSLC - How to find the Repository Workspaces for a stream?
Cliff Gardiner (92●12●34)
| asked May 24 '16, 4:33 a.m.
edited Jun 01 '16, 11:32 p.m. by David Lafreniere (4.8k●7) 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
Ralph Schoon (63.5k●3●36●46)
| 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 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.
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.
|
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.