It's all about the answers!

Ask a question

Team members empty in REST API


Fran Burgos (1081439) | asked Aug 10 '15, 8:35 a.m.

I try to get the members of a team area:

https://localhost:9443/ccm/rpt/repository/foundation?fields=projectAreas/teamArea/(*)

<?xml version="1.0" encoding="UTF-8" ?>
 <foundation Version="1.0.0" rel="next" href="https://localhost:9443/ccm/rpt/repository/foundation?fields=projectAreas%2FteamArea%2F%28*%29&id=_w79RUD9aEeWoevTcgzlpfw&size=100&pos=100">
 <teamArea>
<uniqueId>
609677d3afe269ab6e3c4353708c60a1
</uniqueId>
<reportableUrl>
https://localhost:9443/ccm/rpt/repository/foundation/teamArea/itemId/_gmWmMDUlEeWh0aX97ZegAg
</reportableUrl>
<itemType>
com.ibm.team.process.TeamArea
</itemType>
<stateId>
_S-CW8z9YEeWoevTcgzlpfw
</stateId>
<itemId>
_gmWmMDUlEeWh0aX97ZegAg
</itemId>
<contextId>
_SFnNkDRJEeWiwIum56MxGg
</contextId>
<modified>
2015-08-10T14:06:56.735+0200
</modified>
<archived>
false
</archived>
<name>
Entidades</name>
<modifiedBy />
<teamMembers />
<projectArea />
<qualifiedName>
/Entidades</qualifiedName>
<roles />
<roles />
<roles />
<roleAssignments />
<parentTeamArea />
 </teamArea>
</foundation>

Why are teamMembers and roles completely empty when actually there are users with different roles in this Team Area?

Accepted answer


permanent link
Nate Decker (37812854) | answered Aug 10 '15, 11:06 a.m.

I think there are child nodes under "teamMembers" that you have to dig into further to get the info you are looking for. Try this URL to see what I mean:

https://localhost:9443/ccm/rpt/repository/foundation?fields=projectAreas/teamArea/teamMembers/(*)

Fran Burgos selected this answer as the correct answer

One other answer



permanent link
Donald Nong (14.3k213) | answered Aug 10 '15, 11:48 p.m.
Take a look at the examples in the reportable REST API document to understand how to do field selection and filtering, and in particular how to expand child nodes. In your original URL, (*) or simple * means "all fields at this level". If you want "all fields at this level and the next level", use (*/*) or */*. If you are only interested in the details of "teamMembers" and "roles", use (*|teamMembers/*|roles/*)
https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#Examples

Your answer


Register or to post your answer.