It's all about the answers!

Ask a question

Advanced query using REST interface


Sourajit Basak (1111) | asked Nov 16 '10, 4:46 a.m.
I am trying to execute an advanced query that searches within the contents of assets. Here is the repository location
https://<host>/tools/cm/iram/ram.ws

The query fired is a GET with header Accept=application/atom+xml

https://<host>/tools/cm/iram/ram.ws?oslc_asset.query=oslc_asset:searchTerms="ibm dojotoolkit".

However, this doesn't return the desired results. I guess I missed something.

5 answers



permanent link
Kevin Bauer (34621) | answered Nov 16 '10, 2:13 p.m.
JAZZ DEVELOPER
How are you trying to execute it? You may need to URL encode the query parameter

try...

https://<host>/tools/cm/iram/ram.ws?oslc_asset.query=oslc_asset%3AsearchTerms%3D%22ibm%20dojotoolkit%22


If not what results do you get back?

permanent link
Sourajit Basak (1111) | answered Nov 18 '10, 3:59 a.m.
The URL was encoded, I pasted without escaping for readability.

Whatever query I fire I always get back a html that contains a link to the RAM WSDL.

permanent link
Kevin Bauer (34621) | answered Nov 18 '10, 11:05 a.m.
JAZZ DEVELOPER
The URL was encoded, I pasted without escaping for readability.

Whatever query I fire I always get back a html that contains a link to the RAM WSDL.


So I just realized you are executing against the root of the server. You need to execute against the query context...

https://w3-03.ibm.com/tools/cm/iram/ram.ws/oslc/simpleQuery?oslc_asset.query=oslc_asset:searchTerms%3D"dojotoolkit"

Note this seems to give me what I get if I search for "dojotoolkit" in the search box. We also support the search short cut you can get off the RAM search page for example....

https://w3-03.ibm.com/tools/cm/iram/ram.ws/oslc/simpleQuery?oslc_asset.query=ramSearch:(1txt%2Cibm+dojotoolkit)

which allows for the fuzzy search you may be looking for.

permanent link
Sourajit Basak (1111) | answered Nov 18 '10, 11:11 p.m.
Thanks it worked.

Is this context root standard or configurable ?
Where can I get more information about fuzzy search ?

permanent link
Kevin Bauer (34621) | answered Nov 19 '10, 10:08 a.m.
JAZZ DEVELOPER
The paths are not configurable. See the getting start section on a breakdown of how to discover the resource paths...

https://jazz.net/wiki/bin/view/Main/RamRestApiMain#Getting_started

To find the fuzzy search shortcut you can find on the UI search page. Once you perform search in RAM there is a clipboard icon (View Search Shortcut) on the top right of the search results. Once you click this a text box appear with the search shortcut you can use in the REST call.

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.