<back to all web services

GetABTest

The following routes are available for this service:
GET/RestApi/ab-testing/{id}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Telerik.Sitefinity.ABTesting.Services.Dto.Request;
using Telerik.Sitefinity.ABTesting.Services.Dto;
using Telerik.Sitefinity.ABTesting.Model;

namespace Telerik.Sitefinity.ABTesting.Model
{
    public enum ABTestStatus
    {
        NotStarted,
        Scheduled,
        Active,
        Stopped,
        Ended,
    }

    public enum GoalType
    {
        NextPageView,
        FormSubmission,
        DecConversion,
    }

}

namespace Telerik.Sitefinity.ABTesting.Services.Dto
{
    public partial class ABTestViewModel
    {
        public virtual Guid Id { get; set; }
        public virtual string Title { get; set; }
        public virtual string Description { get; set; }
        public virtual DateTime? StartDate { get; set; }
        public virtual DateTime? StopDate { get; set; }
        public virtual Guid Page { get; set; }
        public virtual Guid SiteId { get; set; }
        public virtual string Culture { get; set; }
        public virtual IEnumerable<VariationViewModel> Variations { get; set; }
        public virtual IEnumerable<GoalViewModel> Goals { get; set; }
        public virtual string ReportUrl { get; set; }
        public virtual DateTime LastModified { get; set; }
        public virtual ABTestStatus Status { get; set; }
        public virtual string Owner { get; set; }
        public virtual Guid? WinnerVariationId { get; set; }
        public virtual Guid? SelectedVariationId { get; set; }
        public virtual string PageNodeErrorMessage { get; set; }
        public virtual string WarningMessage { get; set; }
        public virtual string ApiKey { get; set; }
        public virtual Guid? UserSegmentId { get; set; }
    }

    public partial class GoalViewModel
    {
        public virtual Guid? Id { get; set; }
        public virtual GoalType GoalType { get; set; }
        public virtual string GoalNameResourceKey { get; set; }
        public virtual string PredicateOperator { get; set; }
        public virtual string ObjectId { get; set; }
        public virtual string ObjectName { get; set; }
        public virtual string ObjectCulture { get; set; }
        public virtual bool IsPrimary { get; set; }
        public virtual int Ordinal { get; set; }
    }

    public partial class VariationViewModel
    {
        public virtual Guid? Id { get; set; }
        public virtual string Name { get; set; }
        public virtual int Distribution { get; set; }
        public virtual bool IsOriginal { get; set; }
        public virtual int Ordinal { get; set; }
        public virtual Guid? PageDataId { get; set; }
        public virtual bool IsWinner { get; set; }
    }

}

namespace Telerik.Sitefinity.ABTesting.Services.Dto.Request
{
    public partial class GetABTest
    {
        public virtual Guid Id { get; set; }
    }

}

C# GetABTest 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.

GET /RestApi/ab-testing/{id} HTTP/1.1 
Host: www.asg.com.au 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
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"}