<back to all web services

ABTestViewModel

The following routes are available for this service:
PUT/RestApi/ab-testing
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class ABTestViewModel
{
    open var Id:UUID? = null
    open var Title:String? = null
    open var Description:String? = null
    open var StartDate:Date? = null
    open var StopDate:Date? = null
    open var Page:UUID? = null
    open var SiteId:UUID? = null
    open var Culture:String? = null
    open var Variations:ArrayList<VariationViewModel>? = null
    open var Goals:ArrayList<GoalViewModel>? = null
    open var ReportUrl:String? = null
    open var LastModified:Date? = null
    open var Status:ABTestStatus? = null
    open var Owner:String? = null
    open var WinnerVariationId:UUID? = null
    open var SelectedVariationId:UUID? = null
    open var PageNodeErrorMessage:String? = null
    open var WarningMessage:String? = null
    open var ApiKey:String? = null
    open var UserSegmentId:UUID? = null
}

open class VariationViewModel
{
    open var Id:UUID? = null
    open var Name:String? = null
    open var Distribution:Int? = null
    open var IsOriginal:Boolean? = null
    open var Ordinal:Int? = null
    open var PageDataId:UUID? = null
    open var IsWinner:Boolean? = null
}

open class GoalViewModel
{
    open var Id:UUID? = null
    open var GoalType:GoalType? = null
    open var GoalNameResourceKey:String? = null
    open var PredicateOperator:String? = null
    open var ObjectId:String? = null
    open var ObjectName:String? = null
    open var ObjectCulture:String? = null
    open var IsPrimary:Boolean? = null
    open var Ordinal:Int? = null
}

enum class GoalType
{
    NextPageView,
    FormSubmission,
    DecConversion,
}

enum class ABTestStatus
{
    NotStarted,
    Scheduled,
    Active,
    Stopped,
    Ended,
}

Kotlin ABTestViewModel 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/ab-testing HTTP/1.1 
Host: www.imglobal.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Title":"String","Description":"String","StartDate":"\/Date(-62135578800000)\/","StopDate":"\/Date(-62135578800000)\/","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: application/json
Content-Length: length

{"Title":"String","Description":"String","StartDate":"\/Date(-62135578800000)\/","StopDate":"\/Date(-62135578800000)\/","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"}