readMembershipsForPerson

Method description

readMembershipsForPerson is the method to retrieve all memberships that include given person

Preconditions for use

You will need to know the syncID for the person you want to read memberships for.

Message Schema

Input parameters / request message elements

Name

Description

Data type

Allowed values

M/O

<personSourcedID><identifier>

The membership SyncID for the memberships to read

Text

Max 255 characters

M

Please refer to the WSDL for the full element structure, only key elements are described here

Response message elements

Name

Description

Data type

<membershipIdPairSet>

Wrapper for a list of <membershipIdPair> elements

<membershipIdPair>

Wrapper for a set of one <sourcedId><identifier> element and one <membership> element.

<sourcedId><identifier>

A unique identifier for this set of group / person mappings

Text

<membership>

Wrapper element for one <groupSourcedId ><identifier> element and one <member> element (only the person requested)

<membership><groupSourcedId ><identifier>

The syncID for the group in which the requested person is a member

Text

<membership><member><memberSourcedId ><identifier>

The syncID for the person

Text

<membership><member><role><roleType>

The role of the person in the group.

Text

If the membership does not have any syncID in itslearning at the time you do the request, a syncID for the membership is autogenerated and stored on the membership in itslearning. This syncID will have the format 'itsla-<GUID>'.

This allows itslearning to return memberships that were created through the UI, and that the external system would not know about.

Example

Description

I want to read all memberships for person with syncID = 'AAA'

Person with syncID = 'AAA' has 3 memberships in itslearning:

Example request message

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ims="http://www.imsglobal.org/services/mms/xsd/imsMemberManMessSchema_v1p0" xmlns:ims1="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0" xmlns:ims3="http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0">
<soapenv:Header>
<ims3:syncRequestHeaderInfo>
<ims3:messageIdentifier>1</ims3:messageIdentifier>
</ims3:syncRequestHeaderInfo>
</soapenv:Header>
<soapenv:Body>
<ims:readMembershipsForPersonRequest>
<ims:personSourcedId>
<ims1:identifier>AAA</ims1:identifier>
</ims:personSourcedId>
</ims:readMembershipsForPersonRequest>
</soapenv:Body>
</soapenv:Envelope>

Example response message

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<h:syncResponseHeaderInfo>
<messageIdentifier>1</messageIdentifier>
<statusInfoSet>
<statusInfo>
<codeMajor>success</codeMajor>
<severity>status</severity>
<messageIdRef>1</messageIdRef>
</statusInfo>
</statusInfoSet>
</h:syncResponseHeaderInfo>
<o:Security s:mustUnderstand="1">
<u:Timestamp u:Id="_0">
<u:Created>2011-04-27T11:50:33.112Z</u:Created>
<u:Expires>2011-04-27T11:55:33.112Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<readMembershipsForPersonResponse>
<membershipIDPairSet>
<membershipIdPair>
<sourcedId>
<identifier>itsla-d729b1dc-bd59-4c01-8fe7-f5055afbc6bc</identifier>
</sourcedId>
<membership>
<groupSourcedId>
<identifier>root</identifier>
</groupSourcedId>
<member>
<memberSourcedId>
<identifier>AAA</identifier>
</memberSourcedId>
<role>
<roleType>Instructor</roleType>
</role>
</member>
</membership>
</membershipIdPair>
<membershipIdPair>
<sourcedId>
<identifier>M40</identifier>
</sourcedId>
<membership>
<groupSourcedId>
<identifier>A1</identifier>
</groupSourcedId>
<member>
<memberSourcedId>
<identifier>AAA</identifier>
</memberSourcedId>
<role>
<roleType>Instructor</roleType>
</role>
</member>
</membership>
</membershipIdPair>
<membershipIdPair>
<sourcedId>
<identifier>M41</identifier>
</sourcedId>
<membership>
<groupSourcedId>
<identifier/>
</groupSourcedId>
<member>
<memberSourcedId>
<identifier>AAA</identifier>
</memberSourcedId>
<role>
<roleType>Learner</roleType>
</role>
</member>
</membership>
</membershipIdPair>
</membershipIDPairSet>
</readMembershipsForPersonResponse>
</s:Body>
</s:Envelope>