Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



5 answers

Permanent link

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

0 votes


Permanent link

 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

0 votes

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


Permanent link
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?

0 votes


Permanent link

Hi Chris,


you can get list of view in a component from the below URI

0 votes

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.


Permanent link

 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.

0 votes

Comments

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.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,025

Question asked: Jul 17 '19, 8:58 p.m.

Question was seen: 3,481 times

Last updated: Feb 09 '22, 3:38 a.m.

Confirmation Cancel Confirm