DNG and RPE - View Name to viewUri translation method
Main Issue:
How can I
get the viewUri programmatically?
Detail:
Does anyone know if its possible, via REST\RPE to
Get a list of view names either in a project or a module
Get the corresponding viewURI
The reason for me request is that I am using the following to get a list of columns:
https://server:port/rm/publish/resources?viewURI=id1&projectURI=id2&moduleUri=id3
I can get the projectUri from the project name, and I can get the ModuleUri from a query but I can not seem to get the viewUri programmatically.
I found the following that seems to indicate the only way to do this is via the "Share Link" option in the tool itself:
Is this possible?
Additional:
I know I can use
https://server:port/rm/publish/resources?viewName=name1&projectURI=id2
to get the artifacts but that's not what I need right now
Using DNG 6.0.6
5 answers
Hi Chris, were you able to find a solution to get the viewURI programmatically? I am trying to do the same but I can't find a solution.
Thanks,
Luis
Comments
There is a query capability in OSLC project Services document that can be used to get the list of views in a project...
@Subramaya Can you explain this in more details and can you share the link to where this is explained.
Thanks,
Luis
You may refer https://jazz.net/library/article/1197
Hi Luis,
Unfortunately I was not able to do this.
I had to use the Share Link to View option.
Would be handy if you could get a list of the views.
@Subramanya - I don't understand you comment - can you elaborate please:
"There is a query capability in OSLC project Services document that can be used to get the list of views in a project..."
Can this be accessed via RPE?
Hi Chris,
you can get list of view in a component from the below URI
Comments
Yes - this is an example of the OSLC Query capability for views - you should find this URL by looking for the query capability in the services.xml for the component rather than hard-coding it, because hard-coding risks having to change your code if the implementation changes, which is possible.
Hi Chris,
the query "https://<hostname>/rm/views_oslc/query?componentURI=https://<hostname>/rm/cm/component/<component UUID>&oslc_config.context=https://<hostname>/rm/cm/stream/<stream_id>" returns the list of shared views in a component (see this poste : https://jazz.net/forum/questions/278708/dng-oslc-query-to-get-views-in-a-module), but ...
But the response to the query does not establish whether the shared view :
- applies to all modules of the component
- applies to all modules of a certain type in the component
However, in the response transmitted by the request, there is a URL of the type "https://agsrm-2ap.snm.snecma:9443/rm/views/<view_id>", but it seems that the latter is not programmatically directly reachable (code 403).
Regards.