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

Get more elements than 100 through DNGReportableRestAPI

Hello,

We try to retrieve all resources of a project with a provided stream, through the "DNGReportableRestAPI".
And it seems that we retrieve only 100 elements.

In this documentation, DNGReportableRestAPI, the note about the "get All' request type, talks about "using a default page size of 100 artifacts".

But, we cannot retrieve more than 100 artifacts.

It is something that we miss ? 


0 votes


Accepted answer

Permanent link

I thought it was quite straightforward, but it seems not. The API returns the results in pages, and by default 100 per page.

When you get a page, regardless the page size, you should have the first line similar to this:
<ds:dataSource xmlns:ds="http://jazz.net/xmlns/alm/rm/datasource/v0.1" xmlns:rrm="http://www.ibm.com/xmlns/rrm/1.0/" xmlns:attribute="http://jazz.net/xmlns/alm/rm/attribute/v0.1" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:history="http://jazz.net/xmlns/alm/rm/history/v0.1" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" appId="RRC" href="https://clm603.example.com:9443/rm/publish/resources/*?scoped=false&size=100&projectURI=_DHfKwAjwEeePre_VWPaB3A&token=_oEahkBXKEee-A9dLR8klSA&page=1" rel="next" rrm:totalCount="100" vMajor="60" vMinor="03">

The link in the "href" tag is for the next page. Just follow the link to get the next page and you will get a new link. Follow it, new page, new link, and so on, till the end.

TGS Thales selected this answer as the correct answer

0 votes

Comments

Thanks for your answer ! It works.


2 other answers

Permanent link

Hi,
I have retrieved all before, and it worked as expected. But it seriously impacted the DNG server performance (as there are tens of thousands of artifacts), so it is not really recommended. If you would like to get more than 100, then try to add ?size= such as https://server:port/rm/publish/[artifact_format]/*?size=500
 

0 votes


Permanent link

Hi Kenji.

First of all, thank you for your answer.

In fact, my real need is to re-create the DNG project.
So I need to retrieve all artifacts, but like you say, there is a seriously impact of performances.

I try to get the folders, and for each 'user' request, get modules and for each module, get resources (so the list of artifacts will be filtered) but it seems that it is not possible to retrieve folders.I already post in the forum (https://jazz.net/forum/questions/237370/retrieve-folders-from-rest-api).
And also, I can not get modules when i provide a streamID.

So i though that the only way to rebuild  a DNG project, is to get all artifacts and exploit the 'parentURL' to recreate a tree. But with only 100 artifacts, I have some node which have no 'known' parent.

Maybe someone has an idea ?

Thanks for your help.

0 votes

Comments

I dont know your requirements for the recreated project area, but if you only want to create a "copy" of an existing projectarea, maybe Projectarea Templates (not Process Templates) are a sufficient way?


You can find them in the "Tab" "Templates" of the projectarea properties.
In such a template, you can include or exclude all data for which there is a checkbox in the dialogue:

Create Template

You can even download such a template and upload it to another server.

Of course this is no solution if you want to perform the copy programmatically in another application.

Thank Philip.
But my goal is to extract the informations of all artifacts in a project and inject in an other tool.

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,954

Question asked: Mar 27 '17, 1:00 p.m.

Question was seen: 2,825 times

Last updated: Apr 04 '17, 12:50 p.m.

Confirmation Cancel Confirm