Rational Asset Manager, how to query nested properties with rest api?
I want to query all the assets which have a common relation asset, the rest api command I used is:
http:<ram server>:<port>/ram/oslc/simpleQuery?oslc_asset.query=oslc_asset:relation{ dc:title="xxx"}
but it did not return any assets. But I am sure there are several assets have relation assets with title "xxx" because I queried all assets and saw this relation on multiple assets.
So my question is how to realize my query?
Thanks,
Scott
|
One answer
Hi Scott
If you look at the asset resource you'll see a property like
<dcterms:relation rdf:resource="http://server/ram/oslc/assets/guid/version"/>
So to find all assets related to asset http://server/ram/oslc/assets/abc/1.0 your query would be
http://server/ram/oslc/simpleQuery?oslc.where=dcterms:relation="http://server/ram/oslc/assets/abc/1.0"
Using the asset URL instead of the name is probably safer as you could have two assets with the same name.
If you need a more complicated query that involves nested resources, for example, get me all assets related to assets that are categorized with 'tested/passed' you need to use a tool such as the Lifecycle Query Engine which integrates with RAM and allows you to write SPARQL queries.
See http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m1/index.jsp?topic=%2Fcom.ibm.ram.doc%2Ftopics%2Fc_int_lqe.html
|
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.