It's all about the answers!

Ask a question

How do I add additional filters to a RDNG REST API URI to limit data return


Richard Kissel (30617) | asked Mar 22 '17, 3:24 p.m.

CLM 5.0.2 (iFix007) no JRS

I am trying to figure out how to add additional filters onto a RDNG REST API URI so I can get specific data returned.
I am running into problems with too much data trying to be pulled back.
I am use to working with foundation and RTC specific (SCM, workitem, build) URIS but RDNG seems to be a different set of rules for creating URIs

So far I have this that works, sorry, basically not much: https://server:port/rm/publish/collections?projectName=Application%20Lifecycle%20Management  ..OR..  to try and bring back all projects  https://server:port/rm/publish/collections?projectName=* but this fails with too much data, If I limit the data I am hoping that I can get all I need from all my projects.

What I am trying to achieve is a Report that will show me
RDNG Project Name  |  Release Collection Name   |  Requirement Type  |  Requirement Name

This means that I want to be able to list all my Projects (Currently 163 RDNG projects) all their Collections with a Type of "Release Collection" and the Release Collection artifacts Type & Name. I figure if I limit the data to projects with just Collection of Type release and only bring back the name and type of the artifacts within those Release Collections that I can bring back all the data.

Release Collection Name: artifact/title = All that are only Collections with type 'Release Collection'
 type of collection: artifact/collaboration/attributes/objectType/name = 'Release Collection'
RDNG Project Name: artifact/collaboration/attributes/objectType/projectAreaName = All that contain Collections of type "Release Collection"
Requirement Type: artifact/traceability/links/link type/title = All within the collection of type 'Release Collection'
Requirement Name: artifact/traceability/links/link type/content/artifactFormat = All within the collection of type 'Release Collection'


Returned Data: https://server:port/rm/publish/collections?projectName=Application%20Lifecycle%20Management

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

-<ds:dataSource vMinor="20" vMajor="50" rrm:totalCount="6" appId="RRC" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:history="http://jazz.net/xmlns/alm/rm/history/v0.1" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:attribute="http://jazz.net/xmlns/alm/rm/attribute/v0.1" xmlns:rrm="http://www.ibm.com/xmlns/rrm/1.0/" xmlns:ds="http://jazz.net/xmlns/alm/rm/datasource/v0.1">

+-<ds:artifact attribute:itemId="_9niPwZrmEeWv2K-5Xs0qSQ">
 <rrm:title attribute:itemId="_-2L9gi1bEeSZfYop_8npCg">Release 1</rrm:title>
 <rrm:description attribute:itemId="_-zufYi1bEeSZfYop_8npCg"/>
 <rrm:identifier attribute:itemId="_-64QQi1bEeSZfYop_8npCg">93424</rrm:identifier>
 <rrm:about>https://server:port/rm/resources/_9niPwZrmEeWv2K-5Xs0qSQ</rrm:about>
 <rrm:format attribute:itemId="_-30VMS1bEeSZfYop_8npCg">Collection</rrm:format>
 -<rrm:collaboration>
  +<rrm:creator attribute:itemId="_-55_4S1bEeSZfYop_8npCg">
  <rrm:created attribute:itemId="__A28cS1bEeSZfYop_8npCg">2015-12-05T00:27:27.302+0000</rrm:created>
  <rrm:modified attribute:itemId="__CWxQS1bEeSZfYop_8npCg">2016-03-24T22:32:45.611+0000</rrm:modified>
  -<rrm:attributes>
   +<attribute:objectType attribute:itemId="_ET0D0S1cEeSZfYop_8npCg" attribute:projectAreaName="Application Lifecycle Management" attribute:projectAreaItemId="_9Lv08C1bEeSZfYop_8npCg" attribute:name="Release Collection">
  </rrm:attributes>
+  <rrm:comments>
+  <rrm:revisions>
 </rrm:collaboration>
+ <ds:location>
 <ds:content/>
 <ds:aggregatedContent/>
 -<ds:traceability>
  -<ds:links>
   -<ds:Link type="Link">
    <rrm:title>CLMaaS must match the current physical and response time as currently exist today</rrm:title>
    <ds:linkType/>
    <rrm:relation>https://server:port/rm/resources/_qMbrcX5qEeWqNf0E7SQmFw</rrm:relation>
    <rrm:identifier>88544</rrm:identifier>
    -<ds:content>
     <rrm:title>CLMaaS must match the current physical and response time as currently exist today</rrm:title>
     <rrm:identifier>88544</rrm:identifier>
     <rrm:description/>
     <rrm:format>Text</rrm:format>
     <ds:artifactFormat>Functional Requirement</ds:artifactFormat>
    </ds:content>
   </ds:Link>
  </ds:links>
 </ds:traceability>
</ds:artifact>
+<ds:artifact attribute:itemId="_-B0pAfIPEeWfyKVobd0mQw">

One answer



permanent link
Donald Nong (14.5k414) | answered Apr 03 '17, 10:00 p.m.

Have you tried with "filter by XPath"?
https://jazz.net/wiki/bin/view/Main/RRCReportableRestAPI


Comments
Richard Kissel commented Apr 03 '17, 10:24 p.m.

Error 503: Service Unavailable

CRJZS5531E (More info found at entry [9e176244630997d7] in the RM application server log)


Requirements Management/5.0.2

I am not really sure how this works, there was no examples so all I put in was https://server:port/rm/publish/collections?fields=xpath and I received the above return


Donald Nong commented Apr 04 '17, 2:25 a.m.

Oops! Sorry for the confusion. I just recall that it actually doesn't work. See the below discussion.
https://jazz.net/forum/questions/234842/is-there-any-way-to-suppress-modulecontext-information-in-the-dng-rest-api

In other words, in RDNG, you can't do much with filtering and selection when using the reportable REST API. All the supported options are listed in the table in the document.

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.