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

REST API to query for requirements from DNG

We have a custom Java application (not in the Jazz ecosystem) and would like to query DNG for all requirements using REST services (currently we manually export/import via CSV and would rather export/import programmatically via REST).


Questions are:
  1. Is this possible and if so, is the OSLC REST API or the Reporting REST API the correct path to go down (we only need a basic subset of requirement attributes)?
  2. Is the response data in human readable XML or JSON format?
  3. Would either of these REST APIs limit the response data, and if so, does the response data provide pagination info?
  4. Are queries filterable (e.g. get me all the requirements where the name starts with "ABC*")?

0 votes


Accepted answer

Permanent link
Hi Anne,

A lot of this is covered in the DNG Wiki - great resource for all this. There's also some sample code out there that shows you how to do some of this.

1. If you are only looking to read the requirements, and only looking to get a subset of attributes, then the Reportable REST API would be the simplest interface, as it's simply an authenticate step followed by queries. The OSLC API involves quite a few more steps to do the same thing, but it gives you a lot more power in terms of CRUD operations.

2. The Reportable REST API returns XML documents formatted according to the schema of the resource you're retrieving, so if you are looking at base text artefacts, the retrieved results will be formatted according to https://<your server>/rm/publish/text?metadata=schema. The OSLC API returns XML, ATOM, JSON depending on what you ask for.

3. Both limit the response data but return a bookmark to enable pagination through large result sets, and both offer parameters to increase the size of the results returned per page

4. Both have query capability, but there are some limitations - for instance the Reportable REST API uses XPath but not the full spec, and I don't believe starts-with is one of the supported functions, but there are lots of ways to create query sets with other parameters. You also have the ability to create Views in DNG and retrieve those directly.
Anne C selected this answer as the correct answer

1 vote

Comments

Thanks for the info!  I will check out the DNG Wiki.

Can you provide a link to the DNG Wiki?

 Is this the correct wiki - https://jazz.net/wiki/bin/view?

  In this question https://jazz.net/forum/questions/238288/doors-nextgeneration-apis, he states that the ReqIF (https://jazz.net/wiki/bin/view/Main/DNGReqIF) is not a publicly available REST API but the question was answered 3 years ago.  Is this still the case?

It is actually available through the OSLC approach, but if you can possibly use the Reportable REST API I would use that.

I've looked at it briefly before, and I don't think the ReqIF API will give you what you are looking for - if you were looking for more than just reading requirements I would use the OSLC API, as that's what it's there for.

showing 5 of 6 show 1 more comments

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
× 12,031
× 481

Question asked: Jul 30 '20, 6:02 p.m.

Question was seen: 2,715 times

Last updated: Aug 04 '20, 9:05 p.m.

Confirmation Cancel Confirm