It's all about the answers!

Ask a question

hot to get rrc resource location via rest api


Binoy D'costa (9532737) | asked Jul 17 '13, 1:03 p.m.
 I have a RRC rest query which returns a set of requirements. How do I get the location link from it?

e.g :below is the output. From this how do I get the resource link (bold):

<rdfs:member>
            <oslc_rm:Requirement rdf:about="https://almweb1.ipc.com/rm/resources/_KJ60caOvEeKOxKDk7re7Vg">
                <dcterms:description></dcterms:description>
                <dcterms:contributor rdf:resource="https://almweb1.ipc.com/jts/users/dcostab"/>
                <rt:_O_GpY6beEeKkfY4h6KgkBA rdf:resource="https://almweb1.ipc.com/rm/types/__pNdcqbdEeKkfY4h6KgkBA#7caf41e1-13b7-40b8-85e4-af4540a49020"/>
                <dcterms:title>Touch screen is exciting</dcterms:title>
                <rt:_D7PQIKbaEeKkfY4h6KgkBA rdf:resource="https://almweb1.ipc.com/rm/types/_4PwgcabZEeKkfY4h6KgkBA#20bbacce-7513-4cc8-8ee3-2992f9c3c7e7"/>
                <rt:_vGwuwqhREeKkfY4h6KgkBA>RM-MRD-305</rt:_vGwuwqhREeKkfY4h6KgkBA>
                <rt:_jRLbcqbeEeKkfY4h6KgkBA rdf:resource="https://almweb1.ipc.com/rm/types/_eKE-wqbeEeKkfY4h6KgkBA#b399cb7d-edd3-4fd7-8422-a4f1f60206d9"/>
                <jazz_rm:PrimaryText>Touch screen technology used will be &quot;Capacitive&quot;.</jazz_rm:PrimaryText>
                <oslc_rm:affectedBy rdf:resource="https://almweb1.ipc.com/rm/resources/_oS7EI6waEeKkfY4h6KgkBA"/>
                <rt:_fPpi8aOtEeKOxKDk7re7Vg rdf:resource="https://almweb1.ipc.com/jts/users/dcostab"/>
                <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</dcterms:identifier>
                <dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2013-05-08T19:06:05.646Z</dcterms:modified>
                <rmTypes:ArtifactFormat rdf:resource="https://almweb1.ipc.com/rm/types/_fMeTIaOtEeKOxKDk7re7Vg#Text"/>
                <dcterms:creator rdf:resource="https://almweb1.ipc.com/jts/users/dcostab"/>
                <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2013-04-12T20:25:47.066Z</dcterms:created>
                <oslc_rm:validatedBy rdf:resource="https://almweb1.ipc.com/qm/oslc_qm/contexts/_fUr_hrcrEeKBsI83kD5sQA/resources/com.ibm.rqm.planning.VersionedTestCase/_5D6JIbgPEeKBsI83kD5sQA"/>
                <rt:_w8dfsqbeEeKkfY4h6KgkBA rdf:resource="https://almweb1.ipc.com/rm/types/_t7nk4abeEeKkfY4h6KgkBA#56495c65-9d3a-492b-8a53-a7f6ec570578"/>
                <rt:_fP720KOtEeKOxKDk7re7Vg rdf:resource="https://almweb1.ipc.com/jts/users/dcostab"/>
                <rt:_fPDtEKOtEeKOxKDk7re7Vg rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2013-05-08T19:06:05.646Z</rt:_fPDtEKOtEeKOxKDk7re7Vg>
                <rt:_fQgekaOtEeKOxKDk7re7Vg rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2013-04-12T20:25:47.066Z</rt:_fQgekaOtEeKOxKDk7re7Vg>
            </oslc_rm:Requirement>
        </rdfs:member>

One answer



permanent link
Benjamin Silverman (4.1k610) | answered Jul 17 '13, 1:22 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The location is returned by the RRC Reportable REST API.  For example, see the request below and the sections in bold below where you can see /ds:location/ds:parentFolder/rrm:title contains the folder name and /ds:location/ds:parentFolder/rrm:about contains the location URL.  Hope it helps,

https://clmweb.ibm.com/rm/publish/text?resourceURL=_FQSE4d2rEeKL9anb4T1UDA

<ds:location>
  <ds:project>
    <rrm:title>Test Resource</rrm:title>
    <rrm:about>https://clmweb.ibm.com/jts/resource/itemOid/com.ibm.team.process.ProjectArea/_sGcRAtkoEeKFdLVwIMYRaw</rrm:about>
    <rrm:alternative>https://clmweb.ibm.com/jts/process/project-areas/_sGcRAtkoEeKFdLVwIMYRaw</rrm:alternative>
  </ds:project>
    <ds:parentFolder>
      <rrm:title>My Test Folder</rrm:title>
      <rrm:description>root</rrm:description>
      <rrm:about>https://clmweb.ibm.com/rm/folders/_sGcRAtkoEeKFdLVwIMYRaw</rrm:about>
    </ds:parentFolder>
</ds:location>

Comments
Binoy D'costa commented Jul 17 '13, 1:35 p.m.

Thanks for the quick response.


I should have phrased it correctly, what I'm looking for is the resource link:

<oslc_rm:Requirement rdf:about=https://almweb1.ipc.com/rm/resources/_KJ60caOvEeKOxKDk7re7Vg>

I'm using XML parser to get values for other items e.g 

<dcterms:title>Touch screen is exciting</dcterms:title>

but I can't figure out how to get the resource link.]

Hope I'm clear.


 


1
Edgar Ignacio Velazquez Mar commented Jul 17 '13, 3:11 p.m.
JAZZ DEVELOPER

 Hi Binoy,

 If I understand correctly, what you want is the URL of the link for this elemet, what you need to do is look for the rdf:about attribute on the XML element oslc_rm:Requirement.
The implementation will be different depending on the XML handlers you use. In javax DOM you can do a Element myelement.getNamedAttribute("rdf:about") to get the attribute value


Binoy D'costa commented Jul 18 '13, 6:35 p.m.

Thank you.. I was able to retrieve this link. I'm using LibXML in perl so went through the documentation to get the attribute value.


-Binoy 

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.