It's all about the answers!

Ask a question

DNG OSLC Query on Module


Jayesh Gaikar (59215) | asked Sep 14 '20, 2:36 p.m.
Hi ,

Is it possible to fetch all artifacts under give module?

We have core Artifacts those are reused in several modules. and I wanna query module specific artifact using module Id. Is this even support in APIs?

I tried access artifacts by using Forlder query like

But this always return back Core artifact and not module specific artifact those are having several links associated with it.

Any suggestion reference appreciated...

Thanks & Regards,
-Jay

One answer



permanent link
Ian Barnard (1.9k613) | answered Sep 21 '20, 10:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 21 '20, 10:31 a.m.

Hi


You're only getting core artifacts because only core artifacts have a value for nav:parent (because they are in a folder, that's what nav:parent points at).

I've not found a way to query for a null or empty nav:parent - one way of finding module artifacts would be to remove the oslc.where condition and filter the results in your application to remove the results that do have a nav:parent, leaving you with the module artifacts. This will create larger result sets from the query, increasing server load, which you should be careful about.

Another way might be to use the Reportable REST API which has methods to filter for artifacts by module, or from a view of a module -  so that may be preferable for the problem you're trying to solve. See https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI

HTH
Ian


Comments
Jayesh Gaikar commented Sep 22 '20, 4:45 p.m.
Thanks Ian!

I tried fetching artifacts using reportable APIs, that was my first preference. For some reason HTTP client takes way too long to response back even single page of 100-500 artifacts in it.


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.