Marking an organisation as a user's "home organisation"
How to mark an organisation as the home organisation (release #40)
Brief description: | You can mark and unmark an existing organisation to become the home organisation for a user from release #40 onwards. | |
Preconditions: | You will need to know the syncID(s) of the hierarchy to become the home organization and this hierarchy must have organization type site or school. | |
Events to set the home organisation: | IMS ES Request | Comments |
createMembership | If you:
| |
deleteMembership | The site will be set as new home organization if the deleted membership was the old home organization. | |
replaceMembership | If you:
| |
Events to get the home organisation: | readMembership | It will only return the home organization extension if the membership is actually the home organization. |
Input parameters: | <extensionField><fieldName> - set to ‘HomeOrganisation’ to (un)mark <extensionField><fieldType> - this field is ignored, but set to ‘bool’ for correctness <extensionField><fieldValue> - set to ‘0’ to unmark or set to ‘1’ to mark. NB! If role of the member = '06' /'Mentor', the extension field will be ignored. | |
Example in itslearning: | Example 1: I want to mark the school with syncID = ‘School2’ as the home organization of user with syncID = ‘User1’. Result: School2 will be the home organization for User1. Example 2: I want to know which organization is the home organization for the user with syncID = ‘User1’. To do this I read all memberships for this person and look for the membership which is marked as the home organisation. Result: School2 is the home organization for User1. | |
Example 1 Request to set the home organisation: | <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:ims2="http://www.imsglobal.org/services/mms/xsd/imsMemberManDataSchema_v1p0" xmlns:ims3="http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0"> <soapenv:Header> <ims3:syncRequestHeaderInfo> <ims3:messageIdentifier>123456789</ims3:messageIdentifier> </ims3:syncRequestHeaderInfo> </soapenv:Header> <soapenv:Body> <ims:updateMembershipRequest> <ims:sourcedId> <ims1:identifier>TestMembership</ims1:identifier> </ims:sourcedId> <ims:membership> <ims2:groupSourcedId> <ims1:identifier>School2</ims1:identifier> </ims2:groupSourcedId> <ims2:member> <ims2:memberSourcedId> <ims1:identifier>User1</ims1:identifier> </ims2:memberSourcedId> <ims2:role> <ims2:roleType>01</ims2:roleType> <ims2:extension> <ims1:extensionField> <ims1:fieldName>HomeOrganisation</ims1:fieldName> <ims1:fieldType>bool</ims1:fieldType> <ims1:fieldValue>1</ims1:fieldValue> </ims1:extensionField> </ims2:extension> </ims2:role> </ims2:member> </ims:membership> </ims:updateMembershipRequest> </soapenv:Body></soapenv:Envelope> | |
Example 1 Response: | <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 xmlns:h="http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0" xmlns="http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <messageIdentifier>123456789</messageIdentifier> <statusInfo> <codeMajor>success</codeMajor> <severity>status</severity> <messageIdRef>123456789</messageIdRef> </statusInfo> </h:syncResponseHeaderInfo> <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <u:Timestamp u:Id="_0"> <u:Created>2012-11-22T11:20:41.036Z</u:Created> <u:Expires>2012-11-22T11:25:41.036Z</u:Expires> </u:Timestamp> </o:Security> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <updateMembershipResponse xmlns="http://www.imsglobal.org/services/mms/xsd/imsMemberManMessSchema_v1p0"/> </s:Body></s:Envelope> | |
Example 1 Comments to request / response to set the home organisation: | Note that the extension node is part of the role. The value of the role you set does not influence wether or not the hierarchy is set as home organisation. | |
Example 2: Request to get organisation type: | <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>123456789</ims3:messageIdentifier> </ims3:syncRequestHeaderInfo> </soapenv:Header> <soapenv:Body> <ims:readMembershipsForPersonRequest> <ims:personSourcedId> <ims1:identifier>User1</ims1:identifier> </ims:personSourcedId> </ims:readMembershipsForPersonRequest> </soapenv:Body></soapenv:Envelope> | |
Example 2 Response: | <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 xmlns:h="http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0" xmlns="http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <messageIdentifier>123456789</messageIdentifier> <statusInfoSet> <statusInfo> <codeMajor>success</codeMajor> <severity>status</severity> <messageIdRef>123456789</messageIdRef> </statusInfo> </statusInfoSet> </h:syncResponseHeaderInfo> <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <u:Timestamp u:Id="_0"> <u:Created>2012-11-22T11:22:47.335Z</u:Created> <u:Expires>2012-11-22T11:27:47.335Z</u:Expires> </u:Timestamp> </o:Security> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <readMembershipsForPersonResponse xmlns="http://www.imsglobal.org/services/mms/xsd/imsMemberManMessSchema_v1p0"> <membershipIDPairSet> <membershipIdPair> <sourcedId> <identifier xmlns="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0">RootMembership</identifier> </sourcedId> <membership> <groupSourcedId xmlns="http://www.imsglobal.org/services/mms/xsd/imsMemberManDataSchema_v1p0"> <identifier xmlns="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0">Root</identifier> </groupSourcedId> <member xmlns="http://www.imsglobal.org/services/mms/xsd/imsMemberManDataSchema_v1p0"> <memberSourcedId> <identifier xmlns="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0">User1</identifier> </memberSourcedId> <role> <roleType>Administrator</roleType> </role> </member> </membership> </membershipIdPair> <membershipIdPair> <sourcedId> <identifier xmlns="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0">TestMembership</identifier> </sourcedId> <membership> <groupSourcedId xmlns="http://www.imsglobal.org/services/mms/xsd/imsMemberManDataSchema_v1p0"> <identifier xmlns="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0">School2</identifier> </groupSourcedId> <member xmlns="http://www.imsglobal.org/services/mms/xsd/imsMemberManDataSchema_v1p0"> <memberSourcedId> <identifier xmlns="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0">User1</identifier> </memberSourcedId> <role> <roleType>Administrator</roleType> <extension> <extensionField xmlns="http://www.imsglobal.org/services/common/imsCommonSchema_v1p0"> <fieldName>HomeOrganisation</fieldName> <fieldType>bool</fieldType> <fieldValue>1</fieldValue> </extensionField> </extension> </role> </member> </membership> </membershipIdPair> </membershipIDPairSet> </readMembershipsForPersonResponse> </s:Body></s:Envelope> | |