Delete.Extension.Instance

Method to delete content of existing learning objects.

Action

This type of message will delete an extension element.

Input Parameters

Message

Name

Description

Type

M/O

SiteId

Site where action will be executed

Int

O

VendorId

VendorId which will be associated with created content

Text

O

ContentId

Id of the learning object instance.

Integer

O/M

ContentSyncKey

Learning object instance sync key.

Text

O/M

UserId

Id of user who is deleting.

Integer

O/M

UserSyncKey

SyncKey of user who is deleting.

Text

O/M

Reason

Reason why extension was deleted.

Text

O

Message schema

Update Extension Instance Schema
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:message-schema"
elementFormDefault="qualified"
targetNamespace="urn:message-schema">
<xs:element name="Message" type="MessageType" />
<xs:complexType name="MessageType">
<xs:sequence>
<xs:element name="SiteId" minOccurs="0" maxOccurs="1" type="xs:int" />
<xs:element name="VendorId" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="36"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DeleteExtensionInstance" type="DeleteExtensionInstanceElementType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DeleteExtensionInstanceElementType">
<xs:sequence>
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="ContentId" type="xs:int"/>
<xs:element name="ContentSyncKey" type="xs:string"/>
</xs:choice>
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="UserId" type="xs:int"/>
<xs:element name="UserSyncKey" type="xs:string"/>
</xs:choice>
<xs:element name="Reason" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

Message content example

Update Extension Instance content
<Message xmlns="urn:message-schema">
<VendorId>423bf309-f94e-4975-a190-9193acbe3e41</VendorId>
<DeleteExtensionInstance>
<ContentSyncKey>f8deb028-a05c-4b19-9f7b-813728ec7efe</ContentSyncKey>
<UserId>5</UserId>
<Reason>This is bad content.</Reason>
</DeleteExtensionInstance>
</Message>

Output

Finished Status:

  1. Extension element was deleted.

Error Status:

  1. Message must contain valid ContentId/ContentSyncKey.

  2. Instance with specified ContentId/ContentSyncKey does not exist.

  3. Instance with specified ContentId/ContentSyncKey does not exist or is deleted.

  4. Instance with specified ContentId/ContentSyncKey is not original instance from Library.

  5. The User doesn't have access to my library functionality.

  6. VendorId must be specified.

  7. Another vendor was specified when instance was created.

  8. VendorId can't be specified.

  9. User with specified UserId/UserSyncKey is not an author of the instance.

  10. Can not delete instance from Course.