<back to all web services

ABTestViewModel

The following routes are available for this service:
PUT/RestApi/ab-testing
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Telerik.Sitefinity.ABTesting.Services.Dto
Imports Telerik.Sitefinity.ABTesting.Model

Namespace Global

    Namespace Telerik.Sitefinity.ABTesting.Model

        Public Enum ABTestStatus
            NotStarted
            Scheduled
            Active
            Stopped
            Ended
        End Enum

        Public Enum GoalType
            NextPageView
            FormSubmission
            DecConversion
        End Enum
    End Namespace

    Namespace Telerik.Sitefinity.ABTesting.Services.Dto

        Public Partial Class ABTestViewModel
            Public Overridable Property Id As Guid
            Public Overridable Property Title As String
            Public Overridable Property Description As String
            Public Overridable Property StartDate As Nullable(Of Date)
            Public Overridable Property StopDate As Nullable(Of Date)
            Public Overridable Property Page As Guid
            Public Overridable Property SiteId As Guid
            Public Overridable Property Culture As String
            Public Overridable Property Variations As IEnumerable(Of VariationViewModel)
            Public Overridable Property Goals As IEnumerable(Of GoalViewModel)
            Public Overridable Property ReportUrl As String
            Public Overridable Property LastModified As Date
            Public Overridable Property Status As ABTestStatus
            Public Overridable Property Owner As String
            Public Overridable Property WinnerVariationId As Nullable(Of Guid)
            Public Overridable Property SelectedVariationId As Nullable(Of Guid)
            Public Overridable Property PageNodeErrorMessage As String
            Public Overridable Property WarningMessage As String
            Public Overridable Property ApiKey As String
            Public Overridable Property UserSegmentId As Nullable(Of Guid)
        End Class

        Public Partial Class GoalViewModel
            Public Overridable Property Id As Nullable(Of Guid)
            Public Overridable Property GoalType As GoalType
            Public Overridable Property GoalNameResourceKey As String
            Public Overridable Property PredicateOperator As String
            Public Overridable Property ObjectId As String
            Public Overridable Property ObjectName As String
            Public Overridable Property ObjectCulture As String
            Public Overridable Property IsPrimary As Boolean
            Public Overridable Property Ordinal As Integer
        End Class

        Public Partial Class VariationViewModel
            Public Overridable Property Id As Nullable(Of Guid)
            Public Overridable Property Name As String
            Public Overridable Property Distribution As Integer
            Public Overridable Property IsOriginal As Boolean
            Public Overridable Property Ordinal As Integer
            Public Overridable Property PageDataId As Nullable(Of Guid)
            Public Overridable Property IsWinner As Boolean
        End Class
    End Namespace
End Namespace

VB.NET ABTestViewModel 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/ab-testing HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Title: String,
	Description: String,
	StartDate: 0001-01-01,
	StopDate: 0001-01-01,
	Culture: String,
	ReportUrl: String,
	LastModified: 0001-01-01,
	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/jsv
Content-Length: length

{
	Title: String,
	Description: String,
	StartDate: 0001-01-01,
	StopDate: 0001-01-01,
	Culture: String,
	ReportUrl: String,
	LastModified: 0001-01-01,
	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
}