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

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

 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

0 votes



One answer

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

0 votes

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
× 10,938

Question asked: Nov 19 '19, 12:04 p.m.

Question was seen: 2,053 times

Last updated: Nov 23 '19, 6:22 a.m.

Confirmation Cancel Confirm