<back to all web services

ABTestViewModel

The following routes are available for this service:
PUT/RestApi/ab-testing
"use strict";
export class VariationViewModel {
    /** @param {{Id?:string,Name?:string,Distribution?:number,IsOriginal?:boolean,Ordinal?:number,PageDataId?:string,IsWinner?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    Id;
    /** @type {string} */
    Name;
    /** @type {number} */
    Distribution;
    /** @type {boolean} */
    IsOriginal;
    /** @type {number} */
    Ordinal;
    /** @type {?string} */
    PageDataId;
    /** @type {boolean} */
    IsWinner;
}
/** @typedef {'NextPageView'|'FormSubmission'|'DecConversion'} */
export var GoalType;
(function (GoalType) {
    GoalType["NextPageView"] = "NextPageView"
    GoalType["FormSubmission"] = "FormSubmission"
    GoalType["DecConversion"] = "DecConversion"
})(GoalType || (GoalType = {}));
export class GoalViewModel {
    /** @param {{Id?:string,GoalType?:GoalType,GoalNameResourceKey?:string,PredicateOperator?:string,ObjectId?:string,ObjectName?:string,ObjectCulture?:string,IsPrimary?:boolean,Ordinal?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    Id;
    /** @type {GoalType} */
    GoalType;
    /** @type {string} */
    GoalNameResourceKey;
    /** @type {string} */
    PredicateOperator;
    /** @type {string} */
    ObjectId;
    /** @type {string} */
    ObjectName;
    /** @type {string} */
    ObjectCulture;
    /** @type {boolean} */
    IsPrimary;
    /** @type {number} */
    Ordinal;
}
/** @typedef {'NotStarted'|'Scheduled'|'Active'|'Stopped'|'Ended'} */
export var ABTestStatus;
(function (ABTestStatus) {
    ABTestStatus["NotStarted"] = "NotStarted"
    ABTestStatus["Scheduled"] = "Scheduled"
    ABTestStatus["Active"] = "Active"
    ABTestStatus["Stopped"] = "Stopped"
    ABTestStatus["Ended"] = "Ended"
})(ABTestStatus || (ABTestStatus = {}));
export class ABTestViewModel {
    /** @param {{Id?:string,Title?:string,Description?:string,StartDate?:string,StopDate?:string,Page?:string,SiteId?:string,Culture?:string,Variations?:VariationViewModel[],Goals?:GoalViewModel[],ReportUrl?:string,LastModified?:string,Status?:ABTestStatus,Owner?:string,WinnerVariationId?:string,SelectedVariationId?:string,PageNodeErrorMessage?:string,WarningMessage?:string,ApiKey?:string,UserSegmentId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    Title;
    /** @type {string} */
    Description;
    /** @type {?string} */
    StartDate;
    /** @type {?string} */
    StopDate;
    /** @type {string} */
    Page;
    /** @type {string} */
    SiteId;
    /** @type {string} */
    Culture;
    /** @type {VariationViewModel[]} */
    Variations;
    /** @type {GoalViewModel[]} */
    Goals;
    /** @type {string} */
    ReportUrl;
    /** @type {string} */
    LastModified;
    /** @type {ABTestStatus} */
    Status;
    /** @type {string} */
    Owner;
    /** @type {?string} */
    WinnerVariationId;
    /** @type {?string} */
    SelectedVariationId;
    /** @type {string} */
    PageNodeErrorMessage;
    /** @type {string} */
    WarningMessage;
    /** @type {string} */
    ApiKey;
    /** @type {?string} */
    UserSegmentId;
}

JavaScript ABTestViewModel DTOs

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

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /RestApi/ab-testing HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Title":"String","Description":"String","StartDate":"\/Date(-62135596800000)\/","StopDate":"\/Date(-62135596800000)\/","Culture":"String","ReportUrl":"String","LastModified":"\/Date(-62135596800000-0000)\/","Status":"NotStarted","Owner":"String","WinnerVariationId":"00000000-0000-0000-0000-000000000000","SelectedVariationId":"00000000-0000-0000-0000-000000000000","PageNodeErrorMessage":"String","WarningMessage":"String","ApiKey":"String","UserSegmentId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Title":"String","Description":"String","StartDate":"\/Date(-62135596800000)\/","StopDate":"\/Date(-62135596800000)\/","Culture":"String","ReportUrl":"String","LastModified":"\/Date(-62135596800000-0000)\/","Status":"NotStarted","Owner":"String","WinnerVariationId":"00000000-0000-0000-0000-000000000000","SelectedVariationId":"00000000-0000-0000-0000-000000000000","PageNodeErrorMessage":"String","WarningMessage":"String","ApiKey":"String","UserSegmentId":"00000000-0000-0000-0000-000000000000"}