It's all about the answers!

Ask a question

How to get "Where artifact is used" from the base url


Arjuna Pandu (113) | asked May 03 '23, 1:13 a.m.

 Hello ,


I understood that there are 3 types of URL(may be more) for a particular artifact in DNG




I have a BaseURL and i want to find the where this artifact is included, like a module Url, or corresponding module level url?

Is there any Rest/oslc API to get this information. i was able to get the folderLevelUrl but not moduleLevelUrl
Can anyone please let me know how to find module level url from baseurl?

One answer



permanent link
Ian Barnard (2.0k613) | answered May 04 '23, 3:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited May 09 '23, 4:25 a.m.

 Hi


These are reportable rest API calls. See https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding

I'm not sure what you mean by "FolderLevelUrl" - the base artifact is always in a folder, that folder url is in it's rm_nv:parent property. The example URI you give looks like a folder. That's not an artifact, it's a folder.

Where a (base) artifact has been used in a module this is called a "binding". This can be done any number of times including more than once in any module (although I've never figured out a convincing reason that's a good idea).

You could use OSLC Query https://oslc-op.github.io/oslc-specs/specs/query/oslc-query.html to find resources with the identifier of your base artifact - that would return all of the binding urls as well as the base artifact url. By ensuring you also get the rm_nav:parent value along with the resource url you'll know if this is the base artifact or one of the bindings.

See https://jazz.net/library/article/1197 for more about OSLC Query, although note that doesn't cover configurations.

If your base artifact has id 123 your query would be oslc.where=dcterms:identifier=123

By also specifying oslc.select=rm_nav:parent the query results would include the parent on any resources which have a value for that, i.e. it would be returned on the base artifact, so you can distinguish it from the other results which must all be bindings.

Make sure to use discovery as outlined in that article https://jazz.net/library/article/1197 rather than constructing urls because that's brittle to changes in the ELM OSLC implementation whereas discovery is robust.

HTH
Ian

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.