How to get the name of the team areas where a specific user is a member via RTCs reportable REST API?
I am trying to get the name of the team areas where a specific user is a member via RTCs (6.0.5) reportable REST API, but I fail with this error message: "Error 500: CRRED0135E: Illegal filter. The field 'foundation/teamMembers/userId' may not be used in a filter because it returns multiple values.".
My URL includes the userID: https://<ALM server>/ccm/rpt/repository/foundation?fields=foundation/teamArea[teamMembers/userId='<userID>']/name. But I get the same result if I try to use the uniqueID of the user.
Can anybody help me?
Thanks a lot,
Jochen
Accepted answer
Hi Jochen,
I took a quick look at the RTC RRAPI and didn't see anything about returning a collection of team areas based on a search. But this uses the Foundation API so you could just use the teamembers collection API and pass it the URI of the team member in the main URL in the "hasMembers" parameter. You should get back some XML with all the teams that the team member belongs to. You'll need to use the team-areas-url returned from the projectareas API. For example:
https://localhost:9443/jazz/process/project-areas/_HjuIMqjlEeCTae-N85i1GA/team-areas?hasMember=http://localhost:9080/jazz/users/{userId}
Here's the Foundation API doc for the team areas collection. You might also find this CLM API landing page helpful.
- Jim