It's all about the answers!

Ask a question

How to query DNG for an ID using Web / REST API?


Florin Mihut (111) | asked Nov 19 '19, 12:04 p.m.

 Hi,


Let's assume I have an ID of an requirement (e.g. 692990) and I need its uri to be able to request additional information using the resourceURI:

https://server:port/rm/publish/[artifact_format]?resourceURI=id1

How do I get the from 692990 to something like CA_52d580fa341e42fb9cfd445443543d9d?
I know that I can manually do a quick search in DNG, but I want something similar over the API, is this possible?
I mean if there is a way to get the list of possible URLs I could parse them and extract the resourceURIs.

How do I do that?

Best regards,
Florin

One answer



permanent link
Ian Barnard (1.9k613) | answered Nov 20 '19, 4:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 23 '19, 6:22 a.m.
 Hi Florin

One way, possibly the best way, is to use OSLC queries - these would allow you to search for your specific ID or a range of IDs, or even all artifacts in the configuration (although you need to be wary not to overload your server because queries do place a load on the server, so it is advisable to make more smaller queries than to make fewer larger queries, in order to minimise the impact on other users), and return the artifact URIs and possibly attribute values on those artifacts (depending on what you select to be returned).

There is some old but mostly relevant information about getting started with OSLC queries here: https://jazz.net/library/article/1197

What that article doesn't talk about is how to work when your project has configuration management enabled. I added quite some detail to a recent question about how to get to the QueryCapability in a particular configuration (i.e. in a component) here https://jazz.net/forum/questions/266334/dng-oslcfetch-components-from-project-area

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.