team_membership_list ()
Function prototype | team_membership_list (session, team, with_permissions, [filter], [user]) |
---|---|
API Version | All |
SOAP, REST (Since API Version 2.7.31) |
Description
Returns a list of TEAMs in which the specified TEAM is member
Returns a list of parent Teams in which the specified team is member (a child).
If a User reference is provided, then a parent Team will only be included if the user has a Role in the child Team that matches the Roles that the child Team has in the Parent Team.
For example, consider the following situation:
A Team named "Cardiology" is member of another Team named "Hospital" with Role "Case Manager"
The user 1234 is member of "Cardiology" with Role "Staff"
If we request the memberships of the Team "Cardiology" without specifying a User, then the result will include the Team "Hospital", because "Cardiology" is member of "Hospital".
If we request the memberships of the Team "Cardiology" for the User 1234 , then the result will NOT include the Team "Hospital", because "Cardiology" is member of "Hospital" only with Role "Case Manager", and the User is hasn't that Role in "Cardiology".
Input parameters: |
|
Output parameters: |
|
Request example
team_membership_list (“LC53060c6f729de8.42629546”, 51)
Response
The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API
Return Error codes
ERROR CODE |
|
---|---|
INVALID_TOKEN | The session token provided is not valid |
TEAM.NOT_FOUND | The TEAM was not found |