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

Help to get RRC Reportable Rest API xpath working - need more info

Hi

My company is a rational customer using RTC/Jazz+Doors version 5.0.2.

I am really battling to get the REST API working for xpath searches and cannot find any documentation.

I have founded this:
https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI

The xpath syntax is supposedly this:
https://jazz-server:9443/rm/publish/resources?fields=xpath

So, I tried the following:
https://jazz-server:9443/rm/publish/text?fields=//attribute:customAttribute[attribute:value='1TXN77'] and
https://jazz-server:9443/rm/publish/resources?fields=//attribute:customAttribute[attribute:value='1TXN77']

Knowing that it should at least return the following artifact:

Please help me.

Thanks
Henkie


    <?xml version="1.0" encoding="UTF-8"?>
    <ds:dataSource xmlns:ds="http://jazz.net/xmlns/alm/rm/datasource/v0.1" xmlns:rrm="http://www.ibm.com/xmlns/rrm/1.0/" xmlns:attribute="http://jazz.net/xmlns/alm/rm/attribute/v0.1" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:history="http://jazz.net/xmlns/alm/rm/history/v0.1" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" appId="RRC" rrm:totalCount="1" vMajor="50" vMinor="20">
      <ds:artifact attribute:itemId="_M6fxmBv1EeWSspTLOXWHOg">
        <rrm:title attribute:itemId="_abXFoRvhEeWSspTLOXWHOg">C6 - Pay NOF</rrm:title>
        <rrm:description attribute:itemId="_aa5yoRvhEeWSspTLOXWHOg"/>
        <rrm:identifier attribute:itemId="_abBHYRvhEeWSspTLOXWHOg">64451</rrm:identifier>
        <rrm:about>https://jazz-server:9443/rm/resources/_M6fxmBv1EeWSspTLOXWHOg</rrm:about>
        <rrm:format attribute:itemId="_aaeU0RvhEeWSspTLOXWHOg">Text</rrm:format>
        <rrm:collaboration>
          <rrm:creator attribute:itemId="_aazE8RvhEeWSspTLOXWHOg">
            <rrm:about>https://jazz-server:9443/jts/users/person</rrm:about>
            <rrm:alternative>https://jazz-server:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/person</rrm:alternative>
            <rrm:title>person</rrm:title>
          </rrm:creator>
          <rrm:created attribute:itemId="_aasXQRvhEeWSspTLOXWHOg">2015-06-26T11:19:25.232+0000</rrm:created>
          <rrm:modified attribute:itemId="_abIcIRvhEeWSspTLOXWHOg">2015-06-26T11:19:25.935+0000</rrm:modified>
          <rrm:attributes>
            <attribute:objectType attribute:itemId="_bM9hsRvhEeWSspTLOXWHOg" attribute:name="Transaction" attribute:projectAreaItemId="_aPM48BvhEeWSspTLOXWHOg" attribute:projectAreaName="eNaTIS">
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isEnumeration="true" attribute:isMultiValued="false" attribute:itemId="_bFMs0RvhEeWSspTLOXWHOg" attribute:literalId="_bEzEMRvhEeWSspTLOXWHOg#caddae21-69f5-40cb-8601-193870000f96" attribute:literalName="Completed" attribute:name="Status" attribute:value="13"/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isEnumeration="true" attribute:isMultiValued="false" attribute:itemId="_bF4pVBvhEeWSspTLOXWHOg" attribute:literalId="_bFfnwRvhEeWSspTLOXWHOg#d981374a-4bd1-4549-a338-affbd67af4c7" attribute:literalName="N - No" attribute:name="Design Review Completed?" attribute:value="1"/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isMultiValued="false" attribute:itemId="_atpIdhvhEeWSspTLOXWHOg" attribute:name="RootTag#" attribute:value="77" attribute:valueTS=""/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#string" attribute:isMultiValued="false" attribute:itemId="_atO4wRvhEeWSspTLOXWHOg" attribute:name="Requirement Identifier" attribute:value="1TXN77" attribute:valueTS=""/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#string" attribute:isMultiValued="false" attribute:itemId="_bJNqIRvhEeWSspTLOXWHOg" attribute:name="eNaTIS Menu Code" attribute:value="C6" attribute:valueTS=""/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isEnumeration="true" attribute:isMultiValued="false" attribute:itemId="_bDcZURvhEeWSspTLOXWHOg" attribute:literalId="_bC-fQRvhEeWSspTLOXWHOg#c78aa754-78d1-4616-899d-48c62e19098c" attribute:literalName="Johan Kriel" attribute:name="System Analyst" attribute:value="2"/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#string" attribute:isMultiValued="false" attribute:itemId="_bCCrIRvhEeWSspTLOXWHOg" attribute:name="Page Sequence" attribute:value="P00205, P00215" attribute:valueTS=""/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#string" attribute:isMultiValued="false" attribute:itemId="_bJ4_kRvhEeWSspTLOXWHOg" attribute:name="Menu Level 1" attribute:value="C: Cashier" attribute:valueTS=""/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isMultiValued="false" attribute:itemId="_bI3E0RvhEeWSspTLOXWHOg" attribute:name="Old NaTIS Spec - # of lines" attribute:value="321" attribute:valueTS=""/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#string" attribute:isMultiValued="false" attribute:itemId="_bJjBURvhEeWSspTLOXWHOg" attribute:name="NaTIS Menu Code" attribute:value="C6" attribute:valueTS=""/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isEnumeration="true" attribute:isMultiValued="false" attribute:itemId="_bEdF8RvhEeWSspTLOXWHOg" attribute:literalId="_bEDdURvhEeWSspTLOXWHOg#da108eff-f3a7-4fba-a06e-2562419f5a97" attribute:literalName="Txn" attribute:name="Type" attribute:value="0"/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isMultiValued="false" attribute:itemId="_abBHYRvhEeWSspTLOXWHOg" attribute:name="Identifier" attribute:value="64451" attribute:valueTS=""/>
              <attribute:customAttribute attribute:datatype="http://www.w3.org/2001/XMLSchema#int" attribute:isEnumeration="true" attribute:isMultiValued="false" attribute:itemId="_bHCf4RvhEeWSspTLOXWHOg" attribute:literalId="_bGnCEBvhEeWSspTLOXWHOg#75cd21e5-796c-45ed-be44-0e21afe058df" attribute:literalName="Release 7" attribute:name="Planned Release" attribute:value="9"/>
            </attribute:objectType>
          </rrm:attributes>

0 votes

Comments

Anyone that know of information about achieving this?


Accepted answer

Permanent link
 According to the RM REST API documentation (https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI ), xpath has not been implemented.  If you look under xpath, the description reads: "Allows the ?fields= argument, but does not alter the content that the REST API returns."  Based on my testing, this seems to be the case.  The API accepts the xpath syntax but does nothing with it.

I'm not sure why IBM chose to document xpath as an option if the code to implement the filtering is not in place.  It only serves to confuse.

I too wish xpath was implemented on the RM side as it is with RTC.  It would be a huge help, especially when returning resources for modules, which can be quite bloated.
Henkie Maritz selected this answer as the correct answer

1 vote


One other answer

Permanent link
 It is very confusing !. I am looking for a useful example of the use of XPath in the RRC, in reference to the Reportable Wiki. It is very strage, why IBM  wrote about XPath and don't implement it. 

0 votes

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,938
× 7,496

Question asked: Dec 23 '15, 4:18 a.m.

Question was seen: 3,643 times

Last updated: Mar 23 '16, 4:16 p.m.

Confirmation Cancel Confirm