[RTC EWM] I want to get the list of created queries using API.
I think we create and use it every day.
|
Accepted answer
Ralph Schoon (63.7k●3●36●48)
| answered Jun 07 '21, 7:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 07 '21, 7:10 a.m. Please see: https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Using_Stored_Queries
The headers you use decide if you get the queries just by link, or get the queries with more information.
As an example Accept:text/xml has worked best for me.
Request GET https://elm.example.com:9443/ccm/oslc/queries/_MV9ncHHZEeuKHaIVR_wUnA/rtc_cm:results Request Headers Accept text/xml; charset=utf-8
Another form
Request GET https://elm.example.com:9443/ccm/oslc/queries.xml?oslc_cm.query=rtc_cm%3AprojectArea%3D%22_8e5qfFpmEeukW7cqqDjAuA%22 Request Headers Accept text/xml HIROAKI JOSAKO selected this answer as the correct answer
Comments Use https://rsjazz.wordpress.com/2012/10/29/using-work-item-queris-for-automation/ with the Java API.
HIROAKI JOSAKO
commented Jun 24 '21, 5:02 a.m.
Hi Ralph
Request GET https://elm.example.com:9443/ccm/oslc/queries.xml?oslc_cm.query=rtc_cm%3AprojectArea%3D%22_8e5qfFpmEeukW7cqqDjAuA%22
HIROAKI JOSAKO
commented Jun 24 '21, 5:05 a.m.
Sorry!!
I found various cases, where my query was incorrect and I got every query back, instead an error.
HIROAKI JOSAKO
commented Jun 25 '21, 2:46 a.m.
That was exactly right.
oslc_cm.query = rtc_cm: projectArea = |
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.