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

Retrieve folders from rest API

Hello,

We try to retrieve from a project ID the list of folders.
We have a look to this article : https://rhnaranjo.wordpress.com/2012/06/25/folder-support-added-to-rrc-4-0-oslc-rm-api-implementation/.
But it seems that it does not work.

We also try with the "DNGReportableRestAPI", but the type 'folder' is unknown.

Is anybody found a way to retrieve the list of folders from a project ID ?

Thanks in advance.

0 votes


Accepted answer

Permanent link

It surely works. Note that it is the OSLC API, not the reportable REST API.
https://jazz.net/library/article/1197

Apparently many other users managed to do that in the past.
https://jazz.net/forum/questions/206776/dng-60-list-of-requiremnts-in-a-folder
https://jazz.net/forum/questions/186110/doors-folder-search-with-using-api
https://jazz.net/forum/questions/202684/problem-with-oslc-in-doors-to-get-requirements-from-a-folder

TGS Thales selected this answer as the correct answer

0 votes

Comments

Hi Donald,
Thank you for your answer.
I follow also your article and the workshop of the lab, and I can get the folders.
But, it seems that the oslc is independant of 'stream' or 'baseline' to retrieve the folders.
Because I provide a parameter like 'oslc_config.context' or add for the Header the parameter 'OSLC-Configuration-Context', and it seems that it is not work .

Or maybe folders are 'stream independant' ?

It works for me. I can see different contents when I use different configurations with the same folder query API. That is, there are different contents in different streams, and the API reflects this just fine.

Which parameter do you provide ?
My request is like :
https://dngserver.public.name:port/rm/folders?oslc.where=public_rm:parent= https://dngserver.public.name:port /rm/folders/projectID

And my header has the following parameters:
catalogDoc.addHeader("Accept", "application/xml")
catalogDoc.addHeader("OSLC-Core-Version", "2.0")

I try to add the parameter 'OSLC-Configuration-Context" with the streamUri like " https://dngserver.public.name:port/rm/cm/stream/_XYZ ", but i get no my added folder in the stream...

How did you come up with this parameter? You should use "vvc.configuration" (for local configurations only) or "oslc_config.context" (for both global and local configurations). See the "Configurations" section in the below article
https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI#Configurations
(The article talks about reportable REST API but these two parameters work with OSLC API as well)

The OSLC-Configuration-Context was found in this page (http://open-services.net/wiki/configuration-management/Configuration-Management-Resource-Definitions/#Configuration-context).
And when I try oslc_config.context, I have no difference.
But the good news is with the 'vvc.configuration', I get folders in the selected stream.

I didn't know that some parameters for REST API can work for OSLC.

Many thanks for your help.

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

Question asked: Mar 27 '17, 12:50 p.m.

Question was seen: 3,241 times

Last updated: May 19 '17, 5:41 a.m.

Confirmation Cancel Confirm