Get a list of work items to which a user is subscribed via REST API
![]()
As a follow up to my last question, now that I'm getting valid results using the RESTful API, I wanted to ask for some additional guidance about constructing a query that returns all Change Requests to which a user is subscribed. This may or may not be the currently logged in user, however. Is this possible in an "oslc.where" clause, or is there something else I should be using? So far, all of my attempts have resulted in an Error 400 response from the RTC server. Thanks in advance!
|
2 answers
![]()
I got it!
The URI I used to get all WorkItems to which a user is subscribed was formed as follows: https://<host>:9443/ccm/oslc/contexts/<context>/workitems?oslc.where=rtc_cm:subscribers=<https://<host>:9443/ccm/oslc/users/<userid>>. That got me a list of all workitem urls to which the user was subscribed. I'm able to add on oslc.select terms to get further necessary info. |
![]()
For example
https://<myspecificurl>/jazz/oslc/contexts/_4qVlQGamEeGmlYmiz9lnIA/workitems?where=rtc_cm:subscribers=https://<myspecificurl>/jazz/oslc/users/myuserid
where _4qVlQGamEeGmlYmiz9lnIA is the UUID of the project area , <myspecificurl>is where I've published jazz and myuserid is trivial.
So the <context> reported by James is a specific Project Area and still is not easy to get "all the work items" I'm subscribed to.
|
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.