Public API
Through your AB Tasty account, you can generate credentials linked to roles for the AB Tasty Public API. If you are a partner and want to build a program with our Public API, please contact us at [email protected]
What will you be able to do with our Public API?
Thanks to our Public API and depending of the role of your credentials you will be able to do several thing such as:
Get the tests information
Manage status of every tests
Manage users of your account
Update the AB Tasty script
Clear the AB Tasty script
Get the framework checksum
Quick Start
First of all, an admin of your account have to ask AB Tasty for Public API credentials.
Authentication
POST https://api.abtasty.com/oauth/v2/token
https://api.abtasty.com/oauth/v2/token
{
"client_id":"XXXXXX",
"client_secret":"XXXXXX",
"grant_type":"client_credentials"
}Arguments
client_id
string
true
Example: "2_xe68dghl0ghoo42vay79rytcv"
The client ID
client_secret
string
true
Example: "34g7fpjzq2gww08w84owgrghuowk4goog4kkwkk4s0c057f48kksc"
The client secret
grant_type
string
true
Value to use: "client_credentials"
The grant type: client_credentials
Headers
Content-Type
true
application/json
Accept
true
application/json
Get my tests information
With this role you will be able to:
Get all tests of the account
GET /api/core/accounts/[account_id]/tests
https://api.abtasty.com/api/core/accounts/41902/tests?filter[type][]=ab&filter[type][]=mastersegment&filter[active]=1Requirements
account_id
\d+
integer
ID of the account
Filters
_page
integer
Page of the collection
10
_max_per_page
integer
Limit of items per page
10
filter[name]
string
Search by name of the test
filter[name_or_url]
string
Search by name and url of the test
filter[search]
string
Search by name/url/id of the test
filter[parent][]
integer
Search by parent id (0 for no parent)
filter[type][]
Search by test type
ab/mastersegment/predictive/segmentation/ tunnel/mvt/multipage/ multivariate/subsegment/mobileapp/heatmap
filter[folder][]
integer
Search by folder id (0 for no folder)
filter[active]
0 => pause ; 1 => play
(0/1)
filter[is_preprod]
If is set only preprod test will be returned
filter[is_schedule]
0 -> test not schedule ; 1 -> test schedule
(0/1)
filter[exclude_tag][]
string
exclude specific tag of the collection
filter[tag][]
string
only test with specific tag of the collection
filter[_order][id]
Order collecion by id
(ASC/DESC)
filter[_order][name]
Order collection by name
(ASC/DESC)
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get information of one test
GET /api/v1/accounts/[account_id]/tests/[test_id]
https://api.abtasty.com/api/v1/accounts/41902/tests/381296Requirements
account_id
\d+
integer
ID of the account
test_id
\d+
Integer
ID of the test
Filters
_max_per_page
integer
Limit of items per page
10
_page
integer
Page of the collection
10
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get the variations of a test
GET /api/core/accounts/[account_id]/tests/[test_id]/variations
https://api.abtasty.com/api/core/accounts/41902/tests/381301/variationsRequirements
account_id
\d+
integer
ID of the account
test_id
\d+
Integer
ID of the test
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get one specific variation
GET /api/core/accounts/[account_id]/tests/[test_id]/variations/[variation_id]
https://api.abtasty.com/api/core/accounts/41902/tests/381301/variations/491035Requirements
account_id
\d+
integer
ID of the account
test_id
\d+
Integer
ID of the test
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get modifications of a variation
GET /api/core/accounts/[account_id]/tests/[test_id]/variations/[variation_id]/modifications
https://api.abtasty.com/api/core/accounts/41902/tests/381301/variations/491035/modificationsRequirements
account_id
\d+
integer
ID of the account
test_id
\d+
Integer
ID of the test
variation_id
\d+
integer
ID of the variation
Filters
_max_per_page
integer
Limit of items per page
10
_page
integer
Page of the collection
10
filter[Operation]
string
Search by operation of the modification
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get a specific modification of a variation
GET /api/core/accounts/[account_id]/tests/[test_id]/variations/[variation_id]/modifications/[modification_id]
https://api.abtasty.com/api/core/accounts/41902/tests/381301/variations/491035/modifications/2064015Requirements
account_id
\d+
integer
ID of the account
test_id
\d+
Integer
ID of the test
variation_id
\d+
integer
ID of the variation
modification_id
\d+
Integer
ID of the modification
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get every links of the tests with third party tool
GET /api/core/accounts/[account_id]/tests/[test_id]/toollinks
https://api.abtasty.com/api/core/accounts/41902/tests/381301/toollinksRequirements
account_id
\d+
integer
ID of the account
test_id
\d+
Integer
ID of the test
Filters
_page
integer
Page of the collection
1
_max_per_page
integer
Limit of items per page
10
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get one specific link of the test with a third party tool
GET /api/core/accounts/[account_id]/tests/[test_id]/toollinks/[toollinks_id]
https://api.abtasty.com/api/core/accounts/41902/tests/381301/toollinks/114115Requirements
account_id
\d+
integer
ID of the account
test_id
\d+
Integer
ID of the test
toollinks_id
\d+
Integer
ID of the tool linked
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get events set up in a test
GET /api/core/accounts/[account_id]/tests/[test_id]/global_modifications
https://api.abtasty.com/api/core/accounts/41902/tests/381301/global_modificationsRequirements
account_id
\d+
integer
ID of the account
test_id
\d+
Integer
ID of the test
Filters
_page
integer
Page of the collection
1
_max_per_page
integer
Limit of items per page
10
filter[type]
string
Type of the global modification (plugin or actionTracking)
A valid type
filter[_order][id]
Order collection by id
(ASC/DESC)
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get account's tests statistics
GET /api/core/accounts/[account_id]/general_statistics
https://api.abtasty.com/api/core/accounts/41902/general_statisticsRequirements
account_id
\d+
integer
ID of the account
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Manage my tests
With this role you will be able to update status of any campaign.
All known statuses of the campaign: draft, ready_to_launch, play, pause, in_qa, analysis, interrupted, archive, ended.
For more information about statuses, please visit this page
PATCH /api/v1/accounts/[account_id]/tests/[test_id]
https://api.abtasty.com/api/v1/accounts/41902/tests/381301{
"status":"play"
}if everything was going well, it will return a success response with a 200.
Requirements
account_id
\d+
integer
ID of the account
test_id
\d+
Integer
ID of the test
Allowed transitions
from\to
draft
ready_to_launch
play
pause
in_qa
analysis
archive
ended
interrupted
draft
❌
✅
✅
❌
✅
❌
✅
❌
❌
ready_to_launch
✅
❌
✅
✅
✅
❌
✅
❌
❌
play
❌
❌
❌
✅
✅
✅
✅
✅
❌
pause
❌
✅
✅
❌
✅
✅
✅
✅
❌
in_qa
✅
✅
✅
✅
❌
❌
✅
❌
❌
analysis
❌
❌
✅
❌
❌
❌
✅
✅
❌
archive
✅
❌
❌
✅
❌
❌
❌
❌
❌
ended
❌
❌
✅
❌
❌
✅
✅
❌
❌
interrupted
❌
❌
✅
❌
✅
✅
✅
✅
❌
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Manage AB Tasty's users of my account
With this role you will be able to:
Get all AB Tasty's users of my account
GET /api/core/accounts/[account_id]/membership
https://api.abtasty.com/api/core/accounts/41902/membership?_max_per_page=1if you correctly have access to the account, it will return a 200.
Requirements
account_id
\d+
integer
ID of the account
Filters
_max_per_page
Integer
Limit of items per page
10
_page
integer
Page of the collection
1
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get specific information about an AB Tasty user
GET /api/core/accounts/[account_id]/membership/[membership_id]
https://api.abtasty.com/api/core/accounts/41902/membership/132419Requirements
account_id
\d+
integer
ID of the account
membership_id
\d+
Integer
ID of the user
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Give access to an AB Tasty user
POST /api/core/accounts/[account_id]/membership
https://api.abtasty.com/api/core/accounts/41902/membershipAnd the body you need to insert:
{
"email":"[email protected]",
"role":"user"
}if you correctly have access to the account, it will return a 200.
Requirements
account_id
\d+
integer
ID of the account
Parameters
true
Email of the new user
email address
role
true
Role of the user
[admin|user|creator|viewer]
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Change the role of an AB Tasty user
PATCH /api/core/accounts/[account_id]/membership/[membership_id]
https://api.abtasty.com/api/core/accounts/41902/membership/132419And the body you need to insert:
{
"role":"user"
}if you correctly have access to the account, it will return a 204 no content.
Requirements
account_id
\d+
integer
ID of the account
membership_id
\d+
Integer
ID of the user
Parameters
true
Email of the new user
email address
role
true
Role of the user
[admin|user|creator|viewer]
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Revoke access to a user
DELETE /api/core/accounts/[account_id]/membership/[membership_id]
https://api.abtasty.com/api/core/accounts/41902/membership/132419The request will return a 204 No Content if successful
Requirements
account_id
\d+
integer
ID of the account
membership_id
\d+
Integer
ID of the user
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Update the AB Tasty Script
With this role you will be able to:
Update the AB Tasty Script
PATCH /backend/accounts/[account_id]/tag-rebuild
https://api.abtasty.com/backend/accounts/41902/tag-rebuildThe request will return a 204 No Content if successful
Requirements
account_id
\d+
integer
ID of the account
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Clear the AB Tasty Script
PATCH /backend/accounts/[account_id]/tag-clear
https://api.abtasty.com/backend/accounts/41902/tag-clearThe request will return a 204 No Content if successful
Be careful, every experiments and customization in your website will not be available anymore. This is useful if you notice errors on your site and suspect AB Tasty. Any update of the script will generate the script again (play, pause, update_script,...).
Requirements
account_id
\d+
integer
ID of the account
Headers
Content-Type
true
Format of the request
Authorization
true
User token (example: Bearer [token]
Accept-Language
false
Language use for the response (user setting can override this)
Get framework checksum
With this role you will be able to get the checksum generated for your tag. The route will return the last 10 generated checksums corresponding to the last 10 versions of your tag.
The checksum is generated in SHA512, binary and Base64. It validates the following command:
openssl dgst -sha512 -binary | openssl enc -base64 -A
Get the framework checksum
GET /api/v1/accounts/[account_id]
https://api.abtasty.com/api/v1/accounts/41902Requirements
account_id
\d+
integer
ID of the account
Headers
Content-Type
true
application/json
Authorization
true
authorization token (example: Bearer [token]
Status Code
[201]
Returned when resource is create
[400]
Returned when one or more parameters are invalid
[401]
Returned when authentication is required
[403]
Returned when you have not the necessary permissions for the resource
[404]
Returned when resource could not be found
Last updated
Was this helpful?

