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.
Accepted answer
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
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.