Is There a Simple Work Item Query Via REST API?
I've been looking through the docs and Googling around the web for information on a REST API for querying work items. I've found some old, seemingly outdated information, and I saw a rather complicated API with OLSC that requires multiple calls to just get to the service I need. What I'm looking for is a simple way to query work items in a Node.js app. Something like,
GET https://<rtc_host>:<port>/services/workitems?owner=bob&open=true?foundIn=iteration3
that returns some nice JSON (though I'd settle for nasty XML) with a list of work items that meet the search criteria.
Does something like this exist? If not, can you point me toward a tutorial or some documentation for how to use the existing APIs for querying work items?
Accepted answer
Yes it can be easily done with RTC OSLC API. The query would look like this
To get the response in JSON format, simply add the HTTP Request Header "Accept: application/json".
For more details about using the OSLC API, see below articles.
https://jazz.net/library/article/1001
https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20#Examples
To get the response in JSON format, simply add the HTTP Request Header "Accept: application/json".
For more details about using the OSLC API, see below articles.
https://jazz.net/library/article/1001
https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20#Examples