It's all about the answers!

Ask a question

Compact Rendering (Preview) of execution result from external client


Lars Ohlén (2566) | asked Oct 05 '12, 10:30 a.m.
Hi,

From an external client I would like to get a preview (aka compact rendering ) of an execution result. To the http GET request I have addd the oslc-compact rendering header (and have also tryed the x-jazz-compact header), but it does not work. I get a 200 response but the result is not a preview it is just the standard Dojo html/js page.

I'm trying to mimic the behaviour that you will see if you hover over the Last Result icon in the Test Execution Records window,  where you will get the execution result rendered in a preview panel.  I have copied the same execution result URL and used in my trials.

From my client I can handle the compact rendering / preview function for other resources.

Any help or ideas appreciated.

//Lars

Using RQM 4.0 on Windows 7


Accepted answer


permanent link
Paul McMahan (13613) | answered Oct 05 '12, 12:39 p.m.
JAZZ DEVELOPER
The URL in your comment is the format used by the legacy (non-OSLC) REST API.  Rich hover is only supported by the OSLC API.

That being said, there is a way to get the OSLC URL from the legacy URL, albeit a little bit clumsy.   If you add "?oslclinks=true&fields=/feed/entry/content/executionresult/identifier" onto the legacy URL and do a GET request with Accept: application/xml then the response should contain an <identifier> element with the OSLC URL.

Hope this helps.
Lars Ohlén selected this answer as the correct answer

Comments
Lars Ohlén commented Oct 05 '12, 1:45 p.m.

Works like a charm !


Thanks.

/Lars


Pramod Chandoria commented Oct 06 '12, 2:11 a.m.
JAZZ DEVELOPER

Cool   

One other answer



permanent link
Paul McMahan (13613) | answered Oct 05 '12, 11:33 a.m.
JAZZ DEVELOPER
You should be able to get the compact rendering info by sending a GET request with a header like:

Accept:  application/x-oslc-compact+xml

If you're already sending that header then maybe the URL is not correct.   The URL should have a form like:

https://server:9443/qm/oslc_qm/contexts/_hLRUAAwAEeKVfbfmPIQPJQ/resources/com.ibm
.rqm.execution.ExecutionResult/_cdrmyAwEEeKVfbfmPIQPJQ

Comments
Lars Ohlén commented Oct 05 '12, 12:15 p.m.

Hi Paul,
The URL I have used is totaly different,

So the question is how can I transform the slug URL I have into the one you suggest?
_hLRUAAwAEeKVfbfmPIQPJQ = Project Area GUID
_cdrmyAwEEeKVfbfmPIQPJQ = Excution Result GUID

I know how to obtain the project area GUID, but not the Execution Result GUID.

Thanks

//Lars

Your answer


Register or to post your answer.