It's all about the answers!

Ask a question

Retrieve Parent folder in project areas OSLC/REST

Ahmed EL-BERDHI (1515) | asked May 28 '19, 9:35 a.m.
edited May 28 '19, 9:38 a.m.

 Hey !!

I would like to retrieve the list of folders in a RM Project Area ?

Accepted answer

permanent link
Matthias Buettgen (23612331) | answered May 28 '19, 12:29 p.m.

In the service provider of your project do you find in general two query capabilities. One is for the requirements and the other one for folders. 
So search for the one with the resource type ""
Its querybase points to the rootfolder. If you fetch the results for the root folder you'll get a list of all subfolders underneath the root folder. In order to get the entire folder structure you have to go through each node recursively.

I hope this helps.

Ahmed EL-BERDHI selected this answer as the correct answer

One other answer

permanent link
Ahmed EL-BERDHI (1515) | answered May 29 '19, 4:09 a.m.


Thank you for your answer :), i tried to check for the query capabilities for folders and all i found is capabilities for requirements and collections, maybe i'm looking in the wrong place ?!!



Response :
<?xml version="1.0" encoding="UTF-8"?>

  <oslc_rm:ServiceDescriptor xmlns:oslc_rm="" xmlns:rdf="" rdf:about="https://desktop-03i8ss7:9443/rm/oslc_rm/_Y887IHiQEem5IrL-GwEvYg/services.xml">



        <oslc_rm:validatedByLinkFactory rdf:resource="https://desktop-03i8ss7:9443/rm/links/oslc/validatedByLinks"/>

        <oslc_rm:implementedByLinkFactory rdf:resource="https://desktop-03i8ss7:9443/rm/links/oslc/implementedByLinks"/>







        <oslc_rm:widget rdf:resource="https://desktop-03i8ss7:9443/rm/pickers/"/>

        <dc:title xmlns:dc="">Sélection de collection</dc:title>







        <oslc_rm:widget rdf:resource="https://desktop-03i8ss7:9443/rm/pickers/"/>

        <dc:title xmlns:dc="">Sélection d'exigence</dc:title>



    <dc:description xmlns:dc="">Descripteur de service pour le projet : TProject Capella</dc:description>

    <dc:title xmlns:dc="">TProject Capella</dc:title>


Matthias Buettgen commented May 29 '19, 4:25 a.m.
It seems, as if you didn't set the required headers.
Make sure that the following headers in your http request are set :

OSLC-Core-Version : 2.0
Accept : application/rdf+xml

Once this has been done you should get the complete service provider.

Ahmed EL-BERDHI commented May 29 '19, 4:36 a.m.

 thank you for your help :)

have a nice day.
best regards.

Your answer

Register or 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.