deletePersons
Method description
deletePersons is the method used to delete one or more existing persons in itslearning
Preconditions for use
You need to know the IDs of the persons to delete.
Message Schema
Input parameters / request message elements
Name | Description | Data type | Allowed values | M/O |
---|---|---|---|---|
sourcedIdSet | Wrapper for a list of identifierPair elements | M | ||
identifier | The syncID of the person to be deleted | Text | Valid SyncID | M |
Response message elements
Name | Description | Data type |
---|---|---|
deletePersonsResponse | Empty response element, status conveyed in SOAP header | Empty |
Comments
For each <identifier> in the request you will get a status in the <statusinfoSet><status> of the response. The order of the <statusInfoset><status> corresponds to the the order of the <identifier>in the request.
Example
Description
I want to delete the following persons in itslearning:
- syncID 33333
- syncID 66666
- syncID 99999 -> syncID 999 has already been deleted in itslearning (is in the trashcan)
Example request message
The following example attempts to change the IDs of person 333, 666 and 999 by adding two digits to the ID.
<
soapenv
:Envelope
xmlns:soapenv
=
"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ims
=
"http://www.imsglobal.org/services/pms/xsd/imsPersonManMessSchema_v1p0"
xmlns:ims1
=
"http://www.imsglobal.org/services/common/imsCommonSchema_v1p0"
xmlns:ims2
=
"http://www.imsglobal.org/services/common/imsMessBindSchema_v1p0"
>
<
soapenv
:Header>
<
ims2
:syncRequestHeaderInfo>
<
ims2
:messageIdentifier>1</
ims2
:messageIdentifier>
</
ims2
:syncRequestHeaderInfo>
</
soapenv
:Header>
<
soapenv
:Body>
<
ims
:deletePersonsRequest>
<
ims
:sourcedIdSet>
<
ims1
:identifier>66666</
ims1
:identifier>
<
ims1
:identifier>33333</
ims1
:identifier>
<
ims1
:identifier>999</
ims1
:identifier>
</
ims
:sourcedIdSet>
</
ims
:deletePersonsRequest>
</
soapenv
:Body>
</
soapenv
:Envelope>
Example response message
In the example above, the third <identifier> does not exist in itslearning (has already been deleted, is in the trashcan) -> <statusinfoSet><status> = success, but with a warning saying 'Object has already been deleted'. The first and second <identifier> have successfully been deleted.
<
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
>success</
codeMajor
>
<
severity
>status</
severity
>
<
messageIdRef
>1</
messageIdRef
>
</
statusInfo
>
<
statusInfo
>
<
codeMajor
>success</
codeMajor
>
<
severity
>warning</
severity
>
<
codeMinor
>
<
codeMinorField
>
<
codeMinorName
>personmanagement</
codeMinorName
>
<
codeMinorValue
>alreadydeleted</
codeMinorValue
>
</
codeMinorField
>
</
codeMinor
>
<
messageIdRef
>1</
messageIdRef
>
<
description
>
<
language
>en-US</
language
>
<
text
>Object has been already deleted</
text
>
</
description
>
</
statusInfo
>
</
statusInfoSet
>
</
h
:syncResponseHeaderInfo>
<
o
:Security
s:mustUnderstand
=
"1"
>
<
u
:Timestamp
u:Id
=
"_0"
>
<
u
:Created>2011-02-01T16:04:40.222Z</
u
:Created>
<
u
:Expires>2011-02-01T16:09:40.222Z</
u
:Expires>
</
u
:Timestamp>
</
o
:Security>
</
s
:Header>
<
s
:Body>
<
deletePersonsResponse
/>
</
s
:Body>
</
s
:Envelope>