1. Get A/B Test List
1.1 Request URL
https://api.toponad.net/v3/abtest
1.2 Request method
GET
1.3 Request params
params | type | required | notes |
---|---|---|---|
app_ids | Array[string] | N | App ID list. By default, all app ids can be selected. The maximum number of app ids is 100 |
placement_ids | Array[string] | N | List of placement ids with a maximum of 100 |
name | String | N | A/B test name |
status | Int | N | Status 1=finished, 3=test-in-process, 6=To be effective |
start | Int | N | Start offset, default 0 |
limit | Int | N | Default value is 15. The maximum value can be 100 |
1.4 Return data
fields | type | required | notes |
---|---|---|---|
data | Array[Object] | Y | - |
data.id | Int | Y | A/B test ID |
data.app_id | String | Y | App ID |
data.name | String | Y | A/B test name |
data.status | Int | Y | Status 1=finished, 3=test-in-process, 6=To be effective |
data.start_time_type | Int | Y | Type of start time 1=with immediate effect, 2=Specified effective time |
data.start_time_timezone | Int | Y | Time zone -12~12 = West 12 to East 12 |
data.start_time | Int | Y | Start time, timestamp |
data.items | Array[Object] | Y | Traffics |
data.items.id | Int | Y | Traffic ID |
data.items.name | Int | Y | Traffic name |
data.items.traffic_variation | Int | Y | Traffic weight |
data.items.enable | Bool | Y | Traffic group enabled status false: block up, true: enable |
data.placement_ids | Array[String] | Y | Test placement ids |
data.choices | Array[Object] | Y | The placement cut from the A/B experiment |
data.choices.placement_id | String | Y | Placement ID |
data.choices.item_id | Int | Y | The traffic group ID of the stopped AD space selection |
data.choices.item_name | String | Y | The name of the traffic group selected by the stopped placement |
1.5 Sample
Request sample:
{
"name": "test"
}
Return sample:
{
"page_info": {
"total": 2,
"start": 0,
"limit": 15
},
"data": [
{
"id": 5815,
"app_id": "a60f54770a583d",
"name": "adbc",
"status": 3,
"start_time_type": 1,
"start_time_timezone": 8,
"start_time": 1627639246,
"items": [
{
"id": 10000080,
"name": "A\u7ec4",
"traffic_variation": 2,
"enable": false
},
{
"id": 10000081,
"name": "B\u7ec4",
"traffic_variation": 1,
"enable": false
},
{
"id": 10000082,
"name": "C\u7ec4",
"traffic_variation": 1,
"enable": false
}
],
"placement_ids": [
"b60f6e9480e4ba"
],
"choices": [
{
"placement_id": "b60f547a595c75",
"item_id": 10000081,
"item_name": "B\u7ec4"
}
]
},
{
"id": 5814,
"app_id": "a60f54770a583d",
"name": "asbc",
"status": 1,
"start_time_type": 1,
"start_time_timezone": 8,
"start_time": 1627638003,
"items": [
{
"id": 10000077,
"name": "A\u7ec4",
"traffic_variation": 2,
"enable": false
},
{
"id": 10000078,
"name": "B\u7ec4",
"traffic_variation": 1,
"enable": false
},
{
"id": 10000079,
"name": "C\u7ec4",
"traffic_variation": 1,
"enable": false
}
],
"placement_ids": [],
"choices": [
{
"placement_id": "b60f547a595c75",
"item_id": 10000077,
"item_name": "A\u7ec4"
},
{
"placement_id": "b60f6e9480e4ba",
"item_id": 10000077,
"item_name": "A\u7ec4"
}
]
}
]
}
2. Create A/B test
2.1 Request URL
https://api.toponad.net/v3/abtest
2.2 Request method
POST
2.3 Request params
params | type | required | notes |
---|---|---|---|
name | String | Y | Name |
app_id | String | Y | App ID |
start_time_type | Int | Y | Type of start time 1=with immediate effect, 2=Specified effective time |
start_time_timezone | Int | Y | Time zone of the start time -12~12 = West 12 to East 12 |
start_time | Int | Y | The start time and timestamp are valid immediately |
placement_ids | Array[String] | Y | Test at least one placement |
items | Array[Object] | Y | Traffic in groups, at least two groups |
items.name | String | Y | Traffic name |
items.traffic_variation | Int | Y | Traffic weight |
2.4 Return data
fields | type | required | notes |
---|---|---|---|
id | Int | Y | The created ID is returned on success, and no ID is displayed on failure |
2.5 Sample
Request sample:
{
"name": "test_1",
"app_id": "a60f54770a583d",
"start_time_type": "1",
"start_time_timezone": "8",
"start_time": "1627639246",
"items": [
{
"name": "AAA",
"traffic_variation": 10,
},
{
"name": "BBB",
"traffic_variation": 10,
},
],
"placement_ids": [
"b60f547a2904f9"
],
}
Return sample:
{
"id": 5816
}
3. Update A/B test
3.1 Request URL
https://api.toponad.net/v3/abtest/:id
3.2 Request method
PUT
3.3 Request params
params | type | required | notes |
---|---|---|---|
id | Int | Y | ID |
name | String | Y | Name |
start_time_type | Int | Y | Type of start time 1=with immediate effect, 2=Specified effective time |
start_time_timezone | Int | Y | Time zone of the start time -12~12 = West 12 to East 12 |
start_time | Int | Y | The start time and timestamp are valid immediately |
items | Array[Object] | Y | Traffic group list(All traffic groups need to be reported) |
items.id | Int | Y | Traffic ID |
items.name | String | Y | Traffic name |
items.traffic_variation | Int | Y | Traffic weight |
items.enable | Bool | Y | Traffic group enabled status false: block up , true: enable |
placement_ids | Array[String] | Y | Test placement ids |
choices | Array[Object] | N | The placement cut from the A/B traffic |
choices.placement_id | String | N | Placement ID |
choices.item_id | Int | N | Traffic ID |
choices.item_name | String | N | Traffic name |
3.4 Return data
fields | type | required | notes |
---|---|---|---|
id | int | Y |
3.5 Sample
Request address sample:
https://api.toponad.net/v3/abtest/5810
Sample request parameter:
{
"name": "test_45678",
"start_time_type": "2",
"start_time_timezone": "8",
"start_time": "1627639246",
"items": [
{
"id" : 10000066,
"name": "AAA",
"traffic_variation": 10,
"enable": true
},
{
"id" : 10000067,
"name": "BBB",
"traffic_variation": 10,
"enable": true
},
],
"placement_ids": [
"b60f547a3d8b5d"
],
}
Return sample:
{
"id": 5810
}
4. Stop A/B test
4.1 Request URL
https://api.toponad.net/v3/abtest/:id/stop
4.2 Request method
PUT
4.3 Request params
params | type | required | notes |
---|---|---|---|
placement_id | String | Y | Placement ID |
item_id | Int | Y | The traffic group ID of the stopped placement selection |
4.4 Return data
fields | type | required | notes |
---|---|---|---|
id | Int | Y |
4.5 Sample
Request address sample:
https://api.toponad.net/v3/abtest/5810/stop
Sample request parameter:
{
"choices" : [
{
"placement_id" : "b60f547a3d8b5d",
"item_id" : 10000066,
}
]
}
Return sample: :
{
"id": 5810
}
5. A/B Test Detail
5.1 Request URL
https://api.toponad.net/v3/abtest/:id
5.2 Request method
GET
5.3 Request params
None
5.4 Return data
fields | type | required | notes |
---|---|---|---|
id | Int | Y | ID |
name | String | Y | Name |
app_id | String | Y | App ID |
status | Int | Y | Status 1=finished, 3=test-in-process, 6=To be effective |
start_time_type | Int | Y | Type of start time 1=with immediate effect, 2=Specified effective time |
start_time_timezone | Int | Y | Time zone of the start time -12~12 = West 12 to East 12 |
start_time | Int | Y | Start time, timestamp |
items | Array[Object] | Y | Traffic list |
items.id | Int | Y | Traffic ID |
items.name | String | Y | Traffic name |
items.traffic_variation | Int | Y | Traffic weight |
items.enable | Bool | Y | Traffic group enabled status false: block up, true: enable |
placement_ids | Array[String] | Y | Test placement ids |
choices | Array[Object] | Y | The placement cut from the A/B traffic |
choices.placement_id | String | Y | Placement ID |
choices.item_id | Int | Y | The traffic group ID of the stopped placement selection |
choices.item_name | String | Y | The traffic group name of the stopped placement selection |
5.5 Sample
Request sample:
https://api.toponad.net/v3/abtest/5810
Return sample:
{
"id": 5810,
"name": "test_45678",
"publisher_id": 0,
"app_id": "a60f54770a583d",
"status": 3,
"start_time_type": 1,
"start_time_timezone": 8,
"start_time": 1627635702,
"items": [
{
"id": 10000066,
"name": "AAA",
"traffic_variation": 10,
"enable": false
},
{
"id": 10000067,
"name": "BBB",
"traffic_variation": 10,
"enable": false
}
],
"placement_ids": [
"b60f547a3d8b5d"
],
"choices": [
{
"placement_id": "b60f547a2904f9",
"item_id": 10000066,
"item_name": "AAA"
}
]
}