GET | /RestApi/ab-testing/{id} |
---|
export class GetABTest
{
public Id: string;
public constructor(init?: Partial<GetABTest>) { (Object as any).assign(this, init); }
}
export class VariationViewModel
{
public Id?: string;
public Name: string;
public Distribution: number;
public IsOriginal: boolean;
public Ordinal: number;
public PageDataId?: string;
public IsWinner: boolean;
public constructor(init?: Partial<VariationViewModel>) { (Object as any).assign(this, init); }
}
export enum GoalType
{
NextPageView = 'NextPageView',
FormSubmission = 'FormSubmission',
DecConversion = 'DecConversion',
}
export class GoalViewModel
{
public Id?: string;
public GoalType: GoalType;
public GoalNameResourceKey: string;
public PredicateOperator: string;
public ObjectId: string;
public ObjectName: string;
public ObjectCulture: string;
public IsPrimary: boolean;
public Ordinal: number;
public constructor(init?: Partial<GoalViewModel>) { (Object as any).assign(this, init); }
}
export enum ABTestStatus
{
NotStarted = 'NotStarted',
Scheduled = 'Scheduled',
Active = 'Active',
Stopped = 'Stopped',
Ended = 'Ended',
}
export class ABTestViewModel
{
public Id: string;
public Title: string;
public Description: string;
public StartDate?: string;
public StopDate?: string;
public Page: string;
public SiteId: string;
public Culture: string;
public Variations: VariationViewModel[];
public Goals: GoalViewModel[];
public ReportUrl: string;
public LastModified: string;
public Status: ABTestStatus;
public Owner: string;
public WinnerVariationId?: string;
public SelectedVariationId?: string;
public PageNodeErrorMessage: string;
public WarningMessage: string;
public ApiKey: string;
public UserSegmentId?: string;
public constructor(init?: Partial<ABTestViewModel>) { (Object as any).assign(this, init); }
}
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.
GET /RestApi/ab-testing/{id} HTTP/1.1 Host: www.asg.com.au Accept: text/jsv
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 }