<back to all web services

RelationChangeMessage

The following routes are available for this service:
PUT/RestApi/sitefinity/related-data/relations
namespace Telerik.Sitefinity.Services.RelatedData.Messages

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type RelationChangeMessage() = 
        member val ItemId:String = null with get,set
        member val ItemType:String = null with get,set
        member val ItemProvider:String = null with get,set
        member val RelationChanges:ContentLinkChange[] = [||] with get,set

    [<DataContract>]
    type ContentLinkChangeState =
        | Added = 0
        | Removed = 1
        | Updated = 2

    [<DataContract>]
    [<AllowNullLiteral>]
    type ContentLinkChange() = 
        [<DataMember>]
        member val State:ContentLinkChangeState = new ContentLinkChangeState() with get,set

        [<DataMember>]
        member val ChildItemId:Guid = new Guid() with get,set

        [<DataMember>]
        member val ChildItemProviderName:String = null with get,set

        [<DataMember>]
        member val ChildItemType:String = null with get,set

        [<DataMember>]
        member val ChildItemAdditionalInfo:String = null with get,set

        [<DataMember>]
        member val Ordinal:Nullable<Single> = new Nullable<Single>() with get,set

        [<DataMember>]
        member val ComponentPropertyName:String = null with get,set

F# RelationChangeMessage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
Content-Length: length

{"ItemId":"String","ItemType":"String","ItemProvider":"String","RelationChanges":[{"State":"Added","ChildItemProviderName":"String","ChildItemType":"String","ChildItemAdditionalInfo":"String","Ordinal":0,"ComponentPropertyName":"String","IsChildDeleted":false}]}