In ABtesting.ai the information is organized with the following criteria: Website -> Webpage -> Experiment
A Webpage groups all the experiments that were run for a single page.
You can list all the webpages under a single website doing a GET to the endpoint https://api.abtesting.ai/v1.0/websites/<website_id>/webpages/
.
If you already have the id of the webpage you want to get information from, you can do a GET to the endpoint https://api.abtesting.ai/v1.0/websites/<website_id>/webpages/<webpage_id>/
to get all the experiments data for that webpage.
Remember that you will need to set the Authentication-Token
header with the API Token that you acquired in the authentication step.
import requests
token = 'Your token goes here'
res = requests.get('https://api.abtesting.ai/v1.0/websites/2936/webpages/3437/', headers={'Authentication-Token': token})
print(res.json())
{
"experiments": [
{
"ab_tests": [
{
"conversion_rate_by_experiment": {},
"experiments": [1557],
"experiments_winner": [],
"id": 7434,
"is_original_page": true,
"mobile_screenshot_url": "https://example.com/media/images/image-26f3519d-f474-4c10-a240-f630a749ff27.jpg?_ts=1621902349.673291",
"named_changes": [],
"number": 3,
"screenshot_url": "https://example.com/media/images/image-2d36ae26-5712-4e87-ab1d-ebd09652485e.jpg?_ts=1621902328.1074054",
"thumbnail_url": "https://example.com/media/thumbnails/thumbnail-476ad9f4-d706-48d0-afdc-9a70d1c6c7f9.jpg?_ts=1621902330.4778795",
"time_created": "2021-05-25T00:25:05.509307+00:00",
"visitor_count_by_experiment": {},
"web_page_id": 3437
},
{
"conversion_rate_by_experiment": {},
"experiments": [1557],
"experiments_winner": [],
"id": 7432,
"is_original_page": false,
"mobile_screenshot_url": "https://example.com/media/images/image-536178d9-5149-4a5b-a4fd-f7092bc1f7d6.jpg?_ts=1621902334.7436118",
"named_changes": [
{
"change": "Red (#c23b23)",
"change_type": "color",
"element_text": "Let's talk",
"element_type": "CTA"
}
],
"number": 1,
"screenshot_url": "https://example.com/media/images/image-fd6097e8-6d91-4ff9-a87a-a04fd021c917.jpg?_ts=1621902313.8734276",
"thumbnail_url": "https://example.com/media/thumbnails/thumbnail-64fc4484-ea04-4668-aaa5-9a46ead6d0b5.jpg?_ts=1621902329.866685",
"time_created": "2021-05-25T00:25:05.509307+00:00",
"visitor_count_by_experiment": {},
"web_page_id": 3437
},
{
"conversion_rate_by_experiment": {},
"experiments": [1557],
"experiments_winner": [],
"id": 7433,
"is_original_page": false,
"mobile_screenshot_url": "https://example.com/media/images/image-14eca07e-31c6-41ae-b624-5ec2250d7a42.jpg?_ts=1621902343.153476",
"named_changes": [
{
"change": "Black (#141414)",
"change_type": "color",
"element_text": "Let's talk",
"element_type": "CTA"
}
],
"number": 2,
"screenshot_url": "https://example.com/media/images/image-ab55c876-8016-4282-89a2-b0bcff8e14dc.jpg?_ts=1621902321.0753458",
"thumbnail_url": "https://example.com/media/thumbnails/thumbnail-dd6c9fc6-5837-4e7c-b5c9-e8d6d13a0e02.jpg?_ts=1621902330.2058165",
"time_created": "2021-05-25T00:25:05.509307+00:00",
"visitor_count_by_experiment": {},
"web_page_id": 3437
}
],
"conversion_rate": 0,
"estimated_days_to_end": "None",
"finished": "None",
"id": 1557,
"number": 1,
"progress": "None",
"started": "2021-05-25T00:25:05.509307+00:00",
"visitor_count": 0,
"web_page_id": 3437,
"winner_ab_test": "None"
}
],
"full_url": "https://abtesting.ai/",
"id": 3437,
"is_active": true,
"screenshot_url": "https://example.com/media/images/image-c0b26ff6-c1e1-4a09-95b1-61d095bd433e.jpg?_ts=1621902135.7503812",
"time_created": "2021-05-25T00:22:01.009217+00:00",
"time_updated": "2021-05-25T00:22:01.009217+00:00",
"website_id": 2936
}