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

Retrieve Parent folder in project areas OSLC/REST

 Hey !!

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

0 votes


Accepted answer

Permanent link
HI,

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 "http://jazz.net/ns/rm/navigation#folder"
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.

Regards
Matthias
Ahmed EL-BERDHI selected this answer as the correct answer

1 vote


One other answer

Permanent link

 Hi,

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 ?!!

Greetings

Ahmed


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

  <oslc_rm:ServiceDescriptor xmlns:oslc_rm="http://open-services.net/xmlns/rm/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rdf:about="https://desktop-03i8ss7:9443/rm/oslc_rm/_Y887IHiQEem5IrL-GwEvYg/services.xml">

    <oslc_rm:links>

      <oslc_rm:LinkCreationServices>

        <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:LinkCreationServices>

    </oslc_rm:links>

    <oslc_rm:collections>

      <oslc_rm:CollectionSelectionDialog>

        <oslc_rm:heightHint>550px</oslc_rm:heightHint>

        <oslc_rm:widthHint>800px</oslc_rm:widthHint>

        <oslc_rm:widget rdf:resource="https://desktop-03i8ss7:9443/rm/pickers/com.ibm.rdm.web.CollectionPicker?projectURL=https%3A%2F%2Fdesktop-03i8ss7%3A9443%2Frm%2Frm-projects%2F_Y887IHiQEem5IrL-GwEvYg"/>

        <dc:title xmlns:dc="http://purl.org/dc/terms/">Sélection de collection</dc:title>

      </oslc_rm:CollectionSelectionDialog>

    </oslc_rm:collections>

    <oslc_rm:requirements>

      <oslc_rm:SelectionDialog>

        <oslc_rm:heightHint>550px</oslc_rm:heightHint>

        <oslc_rm:widthHint>800px</oslc_rm:widthHint>

        <oslc_rm:widget rdf:resource="https://desktop-03i8ss7:9443/rm/pickers/com.ibm.rdm.web.RRCPicker?projectURL=https%3A%2F%2Fdesktop-03i8ss7%3A9443%2Frm%2Frm-projects%2F_Y887IHiQEem5IrL-GwEvYg"/>

        <dc:title xmlns:dc="http://purl.org/dc/terms/">Sélection d'exigence</dc:title>

      </oslc_rm:SelectionDialog>

    </oslc_rm:requirements>

    <dc:description xmlns:dc="http://purl.org/dc/terms/">Descripteur de service pour le projet : TProject Capella</dc:description>

    <dc:title xmlns:dc="http://purl.org/dc/terms/">TProject Capella</dc:title>

  </oslc_rm:ServiceDescriptor> 

0 votes

Comments
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.

 thank you for your help :)

have a nice day.
best regards.

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,940
× 7,499

Question asked: May 28 '19, 9:35 a.m.

Question was seen: 2,083 times

Last updated: May 29 '19, 4:36 a.m.

Confirmation Cancel Confirm