Method description


updateMembership is a method to update, replace or create a new membership. If the syncID for the membership exists in itslearning, the membership will be updated. If not, a new membership will be created. It is functionally equivalent to replaceMembership

replaceMembership and updateMembership can only be used to update the roleType or home organisation of existing member. To add, remove or change person to group assignment, use createMembership/deleteMembership instead.


Preconditions for use

You will need to know the membership syncID, as well as the syncID of the group and the syncID of the person who should be updated or created


Message Schema

Input parameters / request message elements

Name

Description

Data type

Allowed values

M/O

<sourcedId><identifier>

A unique identifier for this set of group / person mappings

Text

Max 255 characters

M

<membership>

Wrapper element for one <groupSourcedId ><identifier> element and one or more <member> elements



M

<membership><groupSourcedId ><identifier>

The syncID for the group that will have a member

Text

M

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

The syncID for the person to add as a member

Text


M

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

Response message elements


Name

Description

Data type

updateMembershipResponse

Empty response element

Empty

Example

Description

I want to update the role in hierarchy for membership M1, from roleType 01 to 02

Example request message

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ims="http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0" xmlns:ims1="http://www.imsglobal.org/services/mms/xsd/imsMemberManMessSchema_v1p0" xmlns:ims2="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0" xmlns:ims3="http://www.imsglobal.org/services/mms/xsd/imsMemberManDataSchema_v1p0">
<soapenv:Header>
<ims:syncRequestHeaderInfo>
<ims:messageIdentifier>1</ims:messageIdentifier>
</ims:syncRequestHeaderInfo>
</soapenv:Header>
<soapenv:Body>
<ims1:updateMembershipRequest>
<ims1:sourcedId>
<ims2:identifier>M1</ims2:identifier>
</ims1:sourcedId>
<ims1:membership>
<ims3:groupSourcedId>
<ims2:identifier>G1</ims2:identifier>
</ims3:groupSourcedId>
<ims3:member>
<ims3:memberSourcedId>
<ims2:identifier>99998888</ims2:identifier>
</ims3:memberSourcedId>
<ims3:role>
<ims3:roleType>02</ims3:roleType>
</ims3:role>
</ims3:member>
</ims1:membership>
</ims1:updateMembershipRequest>
</soapenv:Body>
</soapenv:Envelope>


Example response message

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope ">
<s:Header>
<h:syncResponseHeaderInfo>
<messageIdentifier>1</messageIdentifier>
<statusInfo>
<codeMajor>success</codeMajor>
<severity>status</severity>
<messageIdRef>1</messageIdRef>
</statusInfo>
</h:syncResponseHeaderInfo>
<o:Security s:mustUnderstand="1">
<u:Timestamp u:Id="_0">
<u:Created>2011-02-03T15:52:24.225Z</u:Created>
<u:Expires>2011-02-03T15:57:24.225Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<updateMembershipResponse/>
</s:Body>
</s:Envelope>