It's all about the answers!

Ask a question

RTC Rest API Question


Paul Creasey (21122) | asked Oct 21 '10, 9:28 a.m.
Firstly, when using the rest endpoint "https://jtsrv.uk.hibm.hsbc:9092/jazz/oslc/queries/_Jzg54DwKEd-zdvsdtzT-Wg/rtc_cm:results.json" which is supposed to return the the results of a predefined query (url is discovered dynamically through the catalog), there appears to be a 1000 work item limit. Apparently this is a server config setting,

There are in fact almost 2000 results, and i need to know how i can get the rest of the results.

Secondly, the query returns the follow json snippet:


"rtc_cm:filedAgainst":
{"rdf:resource":"https:\/\/jtsrv.uk.hibm.hsbc:9092\/jazz\/resource\/itemOid\/com.ibm.team.workitem.Category\/_eV9YkDGpEd-X0Kmxytu7Wg"}


My problem is that attempting the resolve that resource as "https://jtsrv.uk.hibm.hsbc:9092/jazz/resource/itemOid/com.ibm.team.workitem.Category/_eV9YkDGpEd-X0Kmxytu7Wg.json" returns the following error. This only occurs for the Filed Against/Work Item Category resource, all others work OK.


{"errorTraceMarshall":[{"errorTraceLineNumber":461,"errorTraceClassName":"com.ibm.team.repository.service.internal.ItemRenderService","errorTraceMethodName":"getLocation","errorTraceFileName":"ItemRenderService.java"},{"errorTraceLineNumber":91,"errorTraceClassName":"com.ibm.team.repository.service.internal.ItemRenderService","errorTraceMethodName":"perform_GET","errorTraceFileName":"ItemRenderService.java"},{"errorTraceLineNumber":82,"errorTraceClassName":"com.ibm.team.repository.service.TeamRawService","errorTraceMethodName":"service","errorTraceFileName":"TeamRawService.java"},{"errorTraceLineNumber":-1,"errorTraceClassName":"sun.reflect.GeneratedMethodAccessor302","errorTraceMethodName":"invoke","errorTraceFileName":null},{"errorTraceLineNumber":43,"errorTraceClassName":"sun.reflect.DelegatingMethodAccessorImpl","errorTraceMethodName":"invoke","errorTraceFileName":"DelegatingMethodAccessorImpl.java"},{"errorTraceLineNumber":618,"errorTraceClassName":"java.lang.reflect.Method","errorTraceMethodName":"invoke","errorTraceFileName":"Method.java"},{"errorTraceLineNumber":370,"errorTraceClassName":"org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord","errorTraceMethodName":"invoke","errorTraceFileName":"ExportProxyServiceRecord.java"},{"errorTraceLineNumber":356,"errorTraceClassName":"org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord","errorTraceMethodName":"access$0","errorTraceFileName":"ExportProxyServiceRecord.java"},{"errorTraceLineNumber":56,"errorTraceClassName":"org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler","errorTraceMethodName":"invoke","errorTraceFileName":"ExportProxyServiceRecord.java"},{"errorTraceLineNumber":-1,"errorTraceClassName":"$Proxy129","errorTraceMethodName":"service","errorTraceFileName":null},{"errorTraceLineNumber":879,"errorTraceClassName":"com.ibm.team.repository.servlet.AbstractTeamServerServlet","errorTraceMethodName":"doRestService","errorTraceFileName":"AbstractTeamServerServlet.java"},{"errorTraceLineNumber":1768,"errorTraceClassName":"com.ibm.team.repository.servlet.AbstractTeamServerServlet","errorTraceMethodName":"handleRequest2","errorTraceFileName":"AbstractTeamServerServlet.java"},{"errorTraceLineNumber":1642,"errorTraceClassName":"com.ibm.team.repository.servlet.AbstractTeamServerServlet","errorTraceMethodName":"handleRequest","errorTraceFileName":"AbstractTeamServerServlet.java"},{"errorTraceLineNumber":1555,"errorTraceClassName":"com.ibm.team.repository.servlet.AbstractTeamServerServlet","errorTraceMethodName":"service","errorTraceFileName":"AbstractTeamServerServlet.java"},{"errorTraceLineNumber":729,"errorTraceClassName":"javax.servlet.http.HttpServlet","errorTraceMethodName":"service","errorTraceFileName":"HttpServlet.java"},{"errorTraceLineNumber":180,"errorTraceClassName":"org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper","errorTraceMethodName":"service","errorTraceFileName":"ServletManager.java"},{"errorTraceLineNumber":90,"errorTraceClassName":"org.eclipse.equinox.http.servlet.internal.ServletRegistration","errorTraceMethodName":"handleRequest","errorTraceFileName":"ServletRegistration.java"},{"errorTraceLineNumber":111,"errorTraceClassName":"org.eclipse.equinox.http.servlet.internal.ProxyServlet","errorTraceMethodName":"processAlias","errorTraceFileName":"ProxyServlet.java"},{"errorTraceLineNumber":75,"errorTraceClassName":"org.eclipse.equinox.http.servlet.internal.ProxyServlet","errorTraceMethodName":"service","errorTraceFileName":"ProxyServlet.java"},{"errorTraceLineNumber":729,"errorTraceClassName":"javax.servlet.http.HttpServlet","errorTraceMethodName":"service","errorTraceFileName":"HttpServlet.java"},{"errorTraceLineNumber":121,"errorTraceClassName":"org.eclipse.equinox.servletbridge.BridgeServlet","errorTraceMethodName":"service","errorTraceFileName":"BridgeServlet.java"},{"errorTraceLineNumber":54,"errorTraceClassName":"com.ibm.team.repository.server.servletbridge.JazzServlet","errorTraceMethodName":"service","errorTraceFileName":"JazzServlet.java"},{"errorTraceLineNumber":729,"errorTraceClassName":"javax.servlet.http.HttpServlet","errorTraceMethodName":"service","errorTraceFileName":"HttpServlet.java"},{"errorTraceLineNumber":269,"errorTraceClassName":"org.apache.catalina.core.ApplicationFilterChain","errorTraceMethodName":"internalDoFilter","errorTraceFileName":"ApplicationFilterChain.java"},{"errorTraceLineNumber":188,"errorTraceClassName":"org.apache.catalina.core.ApplicationFilterChain","errorTraceMethodName":"doFilter","errorTraceFileName":"ApplicationFilterChain.java"},{"errorTraceLineNumber":213,"errorTraceClassName":"org.apache.catalina.core.StandardWrapperValve","errorTraceMethodName":"invoke","errorTraceFileName":"StandardWrapperValve.java"},{"errorTraceLineNumber":172,"errorTraceClassName":"org.apache.catalina.core.StandardContextValve","errorTraceMethodName":"invoke","errorTraceFileName":"StandardContextValve.java"},{"errorTraceLineNumber":525,"errorTraceClassName":"org.apache.catalina.authenticator.AuthenticatorBase","errorTraceMethodName":"invoke","errorTraceFileName":"AuthenticatorBase.java"},{"errorTraceLineNumber":127,"errorTraceClassName":"org.apache.catalina.core.StandardHostValve","errorTraceMethodName":"invoke","errorTraceFileName":"StandardHostValve.java"},{"errorTraceLineNumber":117,"errorTraceClassName":"org.apache.catalina.valves.ErrorReportValve","errorTraceMethodName":"invoke","errorTraceFileName":"ErrorReportValve.java"},{"errorTraceLineNumber":108,"errorTraceClassName":"org.apache.catalina.core.StandardEngineValve","errorTraceMethodName":"invoke","errorTraceFileName":"StandardEngineValve.java"},{"errorTraceLineNumber":174,"errorTraceClassName":"org.apache.catalina.connector.CoyoteAdapter","errorTraceMethodName":"service","errorTraceFileName":"CoyoteAdapter.java"},{"errorTraceLineNumber":873,"errorTraceClassName":"org.apache.coyote.http11.Http11Processor","errorTraceMethodName":"process","errorTraceFileName":"Http11Processor.java"},{"errorTraceLineNumber":665,"errorTraceClassName":"org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler","errorTraceMethodName":"processConnection","errorTraceFileName":"Http11BaseProtocol.java"},{"errorTraceLineNumber":528,"errorTraceClassName":"org.apache.tomcat.util.net.PoolTcpEndpoint","errorTraceMethodName":"processSocket","errorTraceFileName":"PoolTcpEndpoint.java"},{"errorTraceLineNumber":81,"errorTraceClassName":"org.apache.tomcat.util.net.LeaderFollowerWorkerThread","errorTraceMethodName":"runIt","errorTraceFileName":"LeaderFollowerWorkerThread.java"},{"errorTraceLineNumber":689,"errorTraceClassName":"org.apache.tomcat.util.threads.ThreadPool$ControlRunnable","errorTraceMethodName":"run","errorTraceFileName":"ThreadPool.java"},{"errorTraceLineNumber":811,"errorTraceClassName":"java.lang.Thread","errorTraceMethodName":"run","errorTraceFileName":"Thread.java"}],"errorCode":400,"errorTrace":["com.ibm.team.repository.service.internal.ItemRenderService.getLocation(ItemRenderService.java:461)","com.ibm.team.repository.service.internal.ItemRenderService.perform_GET(ItemRenderService.java:91)","com.ibm.team.repository.service.TeamRawService.service(TeamRawService.java:82)","sun.reflect.GeneratedMethodAccessor302.invoke(Unknown Source)","sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)","java.lang.reflect.Method.invoke(Method.java:618)","org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:370)","org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:356)","org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)","$Proxy129.service(Unknown Source)","com.ibm.team.repository.servlet.AbstractTeamServerServlet.doRestService(AbstractTeamServerServlet.java:879)","com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest2(AbstractTeamServerServlet.java:1768)","com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest(AbstractTeamServerServlet.java:1642)","com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1555)","javax.servlet.http.HttpServlet.service(HttpServlet.java:729)","org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)","org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)","org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)","org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:75)","javax.servlet.http.HttpServlet.service(HttpServlet.java:729)","org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:121)","com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:54)","javax.servlet.http.HttpServlet.service(HttpServlet.java:729)","org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)","org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)","org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)","org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)","org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)","org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)","org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)","org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)","org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)","org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)","org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)","org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)","org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)","org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)","java.lang.Thread.run(Thread.java:811)"],"errorClass":"com.ibm.team.repository.common.transport.BadRequestException","errorMessage":"CRJAZ0932I Error servicing request for URI \"itemOid\/com.ibm.team.workitem.Category\/_SspQkCtdEd-otOQRxk-p3A.json\". Exception message: CRJAZ0934I URI \"itemOid\/com.ibm.team.workitem.Category\/_SspQkCtdEd-otOQRxk-p3A.json\" is not a valid location. Exception message: invalid UUID [_SspQkCtdEd-otOQRxk-p3A.json]"}

9 answers



permanent link
sam detweiler (12.5k6195201) | answered Oct 21 '10, 10:30 a.m.
what attributes are the 'rest'.. this one is a reference item, actually contains the UUID of the project name.

but user, comments, and attachments should have presented similar problems.

I don't know the answer to your question, but just trying to help debug with additional data

Sam

permanent link
Paul Creasey (21122) | answered Oct 21 '10, 11:20 a.m.
what attributes are the 'rest'.. this one is a reference item, actually contains the UUID of the project name.

but user, comments, and attachments should have presented similar problems.

I don't know the answer to your question, but just trying to help debug with additional data

Sam


By the 'rest', i mean all other enumeration types and user field (owned by, resolved by, modified by etc) that return the same rdf:resource type result.

permanent link
Patrick Streule (4.9k21) | answered Oct 25 '10, 1:38 p.m.
JAZZ DEVELOPER
Firstly, when using the rest endpoint
"https://jtsrv.uk.hibm.hsbc:9092/jazz/oslc/queries/_Jzg54DwKEd-zdvsdtzT-Wg/rtc_cm:results.json"
which is supposed to return the the results of a predefined query
(url is discovered dynamically through the catalog), there appears to
be a 1000 work item limit. Apparently this is a server config setting,


There are in fact almost 2000 results, and i need to know how i can
get the rest of the results.

I don't think the queries are surfaced in the catalog. This is
internal/experimental API at the moment (but will continue to work).

For results obtained using the OSLC query syntax, we support a 'limit'
parameter that allows you to set the limit for the query itself.

For the named queries you mention above, we don't support that parameter
yet. I'd suggest you file an enhancement request.

"rtc_cm:filedAgainst":
{"rdf:resource":"https:\/\/jtsrv.uk.hibm.hsbc:9092\/jazz\/resource\/itemOid\/com.ibm.team.workitem.Category\/_eV9YkDGpEd-X0Kmxytu7Wg"}

My problem is that attempting the resolve that resource as
"https://jtsrv.uk.hibm.hsbc:9092/jazz/resource/itemOid/com.ibm.team.workitem.Category/_eV9YkDGpEd-X0Kmxytu7Wg.json"
returns the following error. This only occurs for the Filed
Against/Work Item Category resource, all others work OK.

The technical issue here is that the /resource/itemOid get interpreted
before the OSLC code can handle them. Appending .json is not an
officially supported way of getting the desired resource format, but
rather a wayto simplify debugging. You should either:

1) Use an Accept: application/json header (that would be the specified
way in OSLC-CM)

2) Use ?_mediaType=application/json (outside the spec as well)

--
Regards,
Patrick
RTC Work Item Component Lead

permanent link
Anthony Kesterton (7.5k7180136) | answered Oct 28 '10, 6:14 a.m.
JAZZ DEVELOPER
Firstly, when using the rest endpoint
"https://jtsrv.uk.hibm.hsbc:9092/jazz/oslc/queries/_Jzg54DwKEd-zdvsdtzT-Wg/rtc_cm:results.json"
which is supposed to return the the results of a predefined query
(url is discovered dynamically through the catalog), there appears to
be a 1000 work item limit. Apparently this is a server config setting,


There are in fact almost 2000 results, and i need to know how i can
get the rest of the results.

I don't think the queries are surfaced in the catalog. This is
internal/experimental API at the moment (but will continue to work).

For results obtained using the OSLC query syntax, we support a 'limit'
parameter that allows you to set the limit for the query itself.

For the named queries you mention above, we don't support that parameter
yet. I'd suggest you file an enhancement request.


Hi Patrick

I have been looking at the 1000 work item settings too (for Paul).

If we change the server limit to 2000 or 3000, that should fix the problem - is that correct? Before we do this - is that going to have any big impact on the server?

thanks

anthony

permanent link
Patrick Streule (4.9k21) | answered Nov 08 '10, 6:53 a.m.
JAZZ DEVELOPER
Hi Patrick

I have been looking at the 1000 work item settings too (for Paul).

If we change the server limit to 2000 or 3000, that should fix the
problem - is that correct? Before we do this - is that going to have
any big impact on the server?

It probably depends on how often the query is run, and whether all or
only a few attributes of each work item are exposed in the query result.

--
Regards,
Patrick
RTC Work Item Component Lead

permanent link
Manthan Shah (1611) | answered Nov 26 '10, 7:40 a.m.
Can we get get history of workitems in RTC 3.0 using REST API? If yes, is this gives history of custom fields?

permanent link
Ammar Darkazanli (262) | answered Dec 06 '10, 4:06 p.m.
I am trying to include the story points for work items of the type story pulled in using OSLC query. I am not able to find the field, anybody has come across this need?

permanent link
Patrick Streule (4.9k21) | answered Dec 14 '10, 8:23 a.m.
JAZZ DEVELOPER
On 12/6/10 10:08 PM, AmmarDarkazanli wrote:
I am trying to include the story points for work items of the type
story pulled in using OSLC query. I am not able to find the field,
anybody has come across this need?


There should be an element

rtc_cm:com.ibm.team.apt.attribute.complexity

--
Regards,
Patrick
RTC Work Item Component Lead

permanent link
Paul Creasey (21122) | answered Dec 29 '10, 9:15 a.m.


2) Use ?_mediaType=application/json (outside the spec as well)



This worked well, thanks (could change the headers, but that is too much like hard work, this is much easier!)

I'll look forward to somebody tackling https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=134657

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.