<back to all web services

RelationChangeMessage

The following routes are available for this service:
PUT/RestApi/sitefinity/related-data/relations

export class RelationChangeMessage
{
    public ItemId: string;
    public ItemType: string;
    public ItemProvider: string;
    public RelationChanges: ContentLinkChange[];

    public constructor(init?: Partial<RelationChangeMessage>) { (Object as any).assign(this, init); }
}

// @DataContract
export enum ContentLinkChangeState
{
    Added = 'Added',
    Removed = 'Removed',
    Updated = 'Updated',
}

// @DataContract
export class ContentLinkChange
{
    // @DataMember
    public State: ContentLinkChangeState;

    // @DataMember
    public ChildItemId: string;

    // @DataMember
    public ChildItemProviderName: string;

    // @DataMember
    public ChildItemType: string;

    // @DataMember
    public ChildItemAdditionalInfo: string;

    // @DataMember
    public Ordinal?: number;

    // @DataMember
    public ComponentPropertyName: string;

    public constructor(init?: Partial<ContentLinkChange>) { (Object as any).assign(this, init); }
}

TypeScript RelationChangeMessage DTOs

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

HTTP + 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
		}
	]
}