It's all about the answers!

Ask a question

DNG and RPE - View Name to viewUri translation method


Chris Hardy (335) | asked Jul 17 '19, 8:58 p.m.
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



permanent link
Jean-François CHAPELLE (5412) | answered Feb 09 '22, 2:23 a.m.

 Hi Chris,



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.


Comments
Ian Barnard commented Feb 09 '22, 3:37 a.m. | edited Feb 09 '22, 3:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Shouldn't hard-code this OSLC query URL because it could change in the future - the correct OSLC query URL for views is always found through discovery as I said in my answer to your question.


permanent link
Bhagath P B (3888) | answered Feb 04 '22, 6:16 a.m.
edited Feb 04 '22, 6:17 a.m.

Comments
Ian Barnard commented Feb 04 '22, 7:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


permanent link
Chris Hardy (335) | answered Jun 20 '21, 7:30 p.m.
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?

permanent link
Luis Rivera-Padilla (11) | answered Jun 18 '21, 5:05 p.m.

 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
Subramanya Prasad Pilar commented Jun 19 '21, 2:30 p.m.

There is a query capability in OSLC project Services document that can be used to get the list of views in a project...


Luis Rivera-Padilla commented Jun 21 '21, 4:28 p.m.

@Subramaya Can you explain this in more details and can you share the link to where this is explained.

Thanks,
Luis


Subramanya Prasad Pilar commented Jun 22 '21, 4:35 a.m. | edited Jun 22 '21, 4:41 a.m.

permanent link
Subramanya Prasad Pilar (4.6k15) | answered Jul 18 '19, 3:20 a.m.

You can find viewURI by selecting in "Share Link to View". I am afraid you cannot get the list of views in a project or module through DNG reportable API

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.