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?
Accepted answer
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.
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?