Execute queries created in the RTC Query Editor via Reportable REST API
Michael Taylor (88●6●57●64)
| asked Jun 24 '13, 3:49 p.m.
edited Nov 19 '20, 6:49 a.m. by Ralph Schoon (63.5k●3●36●46) Can the Reportable REST API (https://<server>:<port>/ccm/rpt/repository/workitem?fields=workitem/workItem/...) be used somehow to run a query that was created in the RTC Query Editor? I see that this can be done using OSLC: I want to know if this can be done using the Reportable REST API. https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Using_Stored_Queries Reference old question: |
One answer
Hi Michael,
contrarily to what I stated previously in https://jazz.net/forum/questions/116945/reportable-rest-api-versus-plain-java-client-api-for-accessing-work-item-queries-and-work-item-attributes you could not execute a query using OSLC. At least not using OSLC v2.0 (i.e. with the header OSLC-Core-Version set to the 2.0 value in your GET header). The alternate way I'm aware of is to build a query (directly in the URL - note that these are not the predefined queries you created before in the UI or the Eclipse client) by filtering on specific attributes, etc on top of base query URL. For a reference on this: check http://open-services.net/bin/view/Main/OslcCoreSpecification#Query_Capabilities My initial answer was based on the information returned using OSLC-Core-Version 1.0 Indeed additional data were returned. For example (this is coming from a try I had today on my 4.0.3 CLM server): <oslc_cm:Collection xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/" oslc_cm:next="https://localhost:9443/ccm/oslc/queries?oslc_cm.pageSize=50&_resultToken=_Kk8-Ut29EeKJf8PdPIFoYQ&_startIndex=50" oslc_cm:totalCount="121" xmlns:dc="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"><rtc_cm:Query rdf:resource="https://localhost:9443/ccm/resource/itemOid/com.ibm.team.workitem.query.QueryDescriptor/_5p8rsDQIEeKrSIP2Razv7w"><dc:identifier>com.ibm.team.workitem.queries.predefined.allRetrospectives</dc:identifier><dc:title>Retrospectives</dc:title><rtc_cm:projectArea rdf:resource="https://localhost:9443/ccm/oslc/projectareas/_4xR-UTQIEeKrSIP2Razv7w"/><dc:description>Find all Retrospectives.</dc:description><rtc_cm:results oslc_cm:collref="https://localhost:9443/ccm/oslc/queries/_5p8rsDQIEeKrSIP2Razv7w/rtc_cm:results"/><dc:creator rdf:resource="https://localhost:9443/jts/users/sleroy"/><dc:modified>2012-11-21T18:26:01.026Z</dc:modified><rtc_cm:modifiedBy rdf:resource="https://localhost:9443/jts/users/sleroy"/></rtc_cm:Query>....Additional content exhibits URLs (like the https://localhost:9443/ccm/oslc/queries/_5p8rsDQIEeKrSIP2Razv7w/rtc_cm:results) that typically returned the associated work-items. For now, I don't believe this would be a recommended practice. Also, you shall keep in mind that loading Jazz server with too much REST calls could introduce performance problems (this was already pinpointed to you by other Jazz developers). So I'd strongly discourage you to investigate towards this (old) solution. Hope this clarified things and sorry for the convenience if my guidance was (temporarily) misleading. Note: I shall make sure the wiki topic https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Using_Stored_Queries also states things more precisely. Regards, Stéphane Comments
Erwin Kunz
commented Apr 23 '14, 6:48 a.m.
Hi Stéphane
Hi Erwin,
Erwin Kunz
commented Apr 24 '14, 8:22 a.m.
Salut Stéphane
Erwin,
Erwin Kunz
commented Apr 24 '14, 10:29 a.m.
Absolutely
In this resource, Dragos points to some external tooling (XML->XSD). I've not checked it myself but this may worths a try...
showing 5 of 6
show 1 more comments
|
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.