It's all about the answers!

Ask a question

Is there any API to fetch only the artifacts or modules which has links in DNG


G C (49111) | asked May 25 '23, 7:04 a.m.

 Is there any API (OSLC or Reportable REST API)  to fetch only the artifacts or modules which has links in DNG

2 answers



permanent link
Ian Barnard (2.2k613) | answered May 25 '23, 8:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

For opt-in (configuration managed):


This could only be possible by OSLC Query into DOORS Next where links are outgoing from artifacts, i.e. they must be RM to RM links because all links from other apps are incoming into DN; but OSLC Query can't filter for a non-empty link property, so the way to do this using OSLC Query is for oslc.select to include the link property and then post-process the results of the query.

For links incoming to DN you'll have to query in the app where the link is stored.

For opt-out:

Backlinks are stored in DN so you may be able to get these using OSLC Query; not sure, you'll have to try it


Comments
G C commented May 26 '23, 6:09 a.m.

Yes I need the API for DNG internal links. It would be helpful if you have any sample query 


G C commented May 29 '23, 6:46 a.m.

Ian Barnard commented May 30 '23, 3:35 a.m. | edited May 30 '23, 3:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

What error are you getting? If you specify oslc.select=* does it work? If you don't specify oslc.select does it work? Are you providing a configuration header, what other headers?


Ian Barnard commented May 30 '23, 3:41 a.m. | edited May 30 '23, 3:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Ian Barnard commented May 30 '23, 3:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

OSLC Query specification: OSLC Query Version 3.0 (oasis-open-projects.org)

For the oslc.select syntax this references the oslc.properties syntax here OSLC Core Version 3.0. Part 1: Overview (oslc-op.github.io) 


G C commented May 30 '23, 11:59 p.m.

Hello Barnard,


Thanks for the help.

I tried with the query you had suggested, I was using satisfaction link UUID for oslc.select, please refer the query i had used below. 
But I am getting artifacts which does not have any links in the API response.


https://server:port/rm/views?oslc.pageSize=200&oslc.paging=true&oslc.prefix=rp0%3D%3Chttps://server:port/rm/types/%3E%2Cdcterms%3D%3Chttp%3A//purl.org/dc/terms/%3E%2Crm_nav%3D%3Chttp%3A//jazz.net/ns/rm/navigation%23%3E&oslc.query=true&oslc.select=rp0%3ALT_RiWh3ccHEeitdLwEqvb98g%2Cdcterms%3Aidentifier%2Crm_nav%3Aparent&projectURL=https://server:port/rm%2Fprocess%2Fproject-areas%2F_lHiK8KCkEeqZEuOY_z6S2A  


Ian Barnard commented May 31 '23, 3:25 a.m. | edited May 31 '23, 3:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I am getting artifacts which does not have any links in the API response


Yes that's expected - as I said in my answer OSLC Query doesn't have a way to filter out resources that don't have a value for a property so you'll have to post-process the results 

showing 5 of 7 show 2 more comments

permanent link
Rakesh S (39113) | answered May 29 '23, 7:01 a.m.

Hi team,


Hope this helps!


Comments
G C commented May 29 '23, 7:29 a.m.

This does not have examples to fetch artifacts which has links. Thank you. 



Ian Barnard commented May 30 '23, 5:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Links are no different from any other property of an artifact so yes that article is relevant - but note you'll only see them on the artifact that is the 'from' end of the link

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.