The Get A/B Definition command allows you to return the details of a specific A/B Definition. This command returns. This command returns the Details of the definitions as well as the Samples in the definition.
Arguments
The Get A/B Definition requires the following arguments: Command, Realm, Password, and A/B Definition ID.
api_web?r=myrealm&p=mypass&c=getabdefinitionbyid&ab_definition_id=123
The command is ‘getabdefinitionbyid’, the realm is ‘myrealm’ and the password is ‘mypass’. The details for the definition '123' will be displayed.
The Get A/B Definition command supports the following arguments:
Name |
Req? |
Description |
Argument |
Command |
Yes |
Defines the command to use. |
cmd= getabdefinitionbyid c=getabdefinitionbyid |
Realm |
Yes |
Name of the realm to run the command. This is required, and the command will fail if the realm and password do not match. |
realm=[realm_name] r=[realm_name] |
Password |
Yes |
Authentication code for API access. This is required, and the command will fail if the realm and password do not match. |
pwd=[password] p=[password] |
A/B Definition ID | Yes | ID of the definitions to return. | ab_defintion_id=[ab_definition_id] |
Output Format |
|
To specify the format of the list output, use one of two arguments. If no argument is included, the default output is space-delimited plain text string, which may not include all data columns.
|
csv=1 or output_format=[csv,csv_tab, csv_pipe,xml] |
Example
Using all commands and arguments (please note the command is wrapped for display purposes only):
api_web?r=myrealm&p=mypass&c=getabdefinitionbyid&ab_definition_id=123&output_format=csv
Successful results return the Details and Samples for the specified definition:
D,123,myabtest,description,66,mylist,0,,5,Responder Rate,2,300,percent,1,1,1,when test time reached,0,Let user manually determine winner S,A,66,Sample A,sampleEmailA@domain.com S,B,67,Sample B,SampleEmailB@domain.com
The results do not support displaying with a header.
Results
The Get A/B Definition command outputs either the results of the search or a FAILURE message.
SUCCESS
The Get A/B Definition command does not explicitly return a Success code. Instead, it outputs the following details:
For record_type D (Data Details):
Record Type (CSV ONLY), A/B Definition ID, A/B Definition Name, Description, List ID, List Name, Segmentation Rule ID, Suppression List, Max Time, Measuring, Number Samples, Sample Size, sample Type, Test Subject Line, Test From Address, Test Content, Test Ends When, Threshold, Post Test Action
For record type S (Sample):
Record Type (CSV ONLY), sample, Template ID, subject Line, From Address
FAILURE
A Get A/B Definition command will fail for several reasons. The result format is:
FAILURE: [Reason]