PUT | /RestApi/sitefinity/related-data/relations |
---|
"use strict";
export class RelationChangeMessage {
/** @param {{ItemId?:string,ItemType?:string,ItemProvider?:string,RelationChanges?:ContentLinkChange[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ItemId;
/** @type {string} */
ItemType;
/** @type {string} */
ItemProvider;
/** @type {ContentLinkChange[]} */
RelationChanges;
}
/** @typedef {'Added'|'Removed'|'Updated'} */
export var ContentLinkChangeState;
(function (ContentLinkChangeState) {
ContentLinkChangeState["Added"] = "Added"
ContentLinkChangeState["Removed"] = "Removed"
ContentLinkChangeState["Updated"] = "Updated"
})(ContentLinkChangeState || (ContentLinkChangeState = {}));
export class ContentLinkChange {
/** @param {{State?:ContentLinkChangeState,ChildItemId?:string,ChildItemProviderName?:string,ChildItemType?:string,ChildItemAdditionalInfo?:string,Ordinal?:number,ComponentPropertyName?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ContentLinkChangeState} */
State;
/** @type {string} */
ChildItemId;
/** @type {string} */
ChildItemProviderName;
/** @type {string} */
ChildItemType;
/** @type {string} */
ChildItemAdditionalInfo;
/** @type {?number} */
Ordinal;
/** @type {string} */
ComponentPropertyName;
}
JavaScript 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
}
]
}