PUT | /RestApi/sitefinity/related-data/relations |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Telerik.Sitefinity.Services.RelatedData.Messages
Imports Telerik.Sitefinity.Web.UI.Fields.Enums
Namespace Global
Namespace Telerik.Sitefinity.Services.RelatedData.Messages
<DataContract>
Public Partial Class ContentLinkChange
<DataMember>
Public Overridable Property State As ContentLinkChangeState
<DataMember>
Public Overridable Property ChildItemId As Guid
<DataMember>
Public Overridable Property ChildItemProviderName As String
<DataMember>
Public Overridable Property ChildItemType As String
<DataMember>
Public Overridable Property ChildItemAdditionalInfo As String
<DataMember>
Public Overridable Property Ordinal As Nullable(Of Single)
<DataMember>
Public Overridable Property ComponentPropertyName As String
End Class
Public Partial Class RelationChangeMessage
Public Sub New()
RelationChanges = New ContentLinkChange(){}
End Sub
Public Overridable Property ItemId As String
Public Overridable Property ItemType As String
Public Overridable Property ItemProvider As String
Public Overridable Property RelationChanges As ContentLinkChange()
End Class
End Namespace
Namespace Telerik.Sitefinity.Web.UI.Fields.Enums
<DataContract>
Public Enum ContentLinkChangeState
Added
Removed
Updated
End Enum
End Namespace
End Namespace
VB.NET RelationChangeMessage DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /RestApi/sitefinity/related-data/relations HTTP/1.1
Host: www.asg.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ItemId: String,
ItemType: String,
ItemProvider: String,
RelationChanges:
[
{
State: Added,
ChildItemProviderName: String,
ChildItemType: String,
ChildItemAdditionalInfo: String,
Ordinal: 0,
ComponentPropertyName: String,
IsChildDeleted: False
}
]
}