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

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

0 votes



One answer

Permanent link
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

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

Question asked: May 29 '13, 7:15 p.m.

Question was seen: 6,120 times

Last updated: Jun 03 '13, 5:25 p.m.

Confirmation Cancel Confirm