readMemberships

Method description

readMemberships is the method to retrieve one or more sets of memberships

Preconditions for use

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

Message Schema

Input parameters / request message elements

Name

Description

Data type

Allowed values

M/O

<sourcedIdSet>

Wrapper for a list of <identifier> elements

M

<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

readMembershipsResponse

Empty response element

Empty

Comments

For each <identifier> in the request you will get a status in the <statusinfoSet><status> in the response.
The order of the <statusInfoset><status> corresponds to the the order of the <identifier> in the request.

Example

Description

I want to read membership with syncID = M2 and syncID = M3 from itslearning.

  • syncID = M2

  • syncID = M3

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:readMembershipsRequest>
<ims:sourcedIdSet>
<ims1:identifier>M2</ims1:identifier>
<ims1:identifier>M4</ims1:identifier>
</ims:sourcedIdSet>
</ims:readMembershipsRequest>
</soapenv:Body>
</soapenv:Envelope>

Example response message

Result: Only M2 exists in itslearning.
Response should for M2 return one group (G2) with one member (99998888).

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:syncResponseHeaderInfo>
<messageIdentifier>1</messageIdentifier>
<statusInfoSet>
<statusInfo>
<codeMajor>success</codeMajor>
<severity>status</severity>
<messageIdRef>1</messageIdRef>
</statusInfo>
<statusInfo>
<codeMajor>failure</codeMajor>
<severity>error</severity>
<codeMinor>
<codeMinorField>
<codeMinorName>membershipmanagement</codeMinorName>
<codeMinorValue>unknownobject</codeMinorValue>
</codeMinorField>
</codeMinor>
<messageIdRef>1</messageIdRef>
<description>
<language>en-US</language>
<text>The 'sourcedId' identifier is unknown in the target system</text>
</description>
</statusInfo>
</statusInfoSet>
</h:syncResponseHeaderInfo>
<o:Security s:mustUnderstand="1">
<u:Timestamp u:Id="_0">
<u:Created>2011-02-03T15:27:12.777Z</u:Created>
<u:Expires>2011-02-03T15:32:12.777Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<readMembershipsResponse>
<membershipSet>
<membership>
<groupSourcedId>
<identifier>G2</identifier>
</groupSourcedId>
<member>
<memberSourcedId>
<identifier>99998888</identifier>
</memberSourcedId>
<role>
<roleType>Learner</roleType>
</role>
</member>
</membership>
</membershipSet>
</readMembershipsResponse>
</s:Body>
</s:Envelope>