Public API

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

Each use case need specific access delivered through your AB Tasty's account settings. Please ask your admin to grant you with the correct access.

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

Parameter
Type
Required
Format
Description

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

Name
Required
Value

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]=1

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

Filters

Name
Datatype
Description
Pattern
Default

_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

Name
Required
Description

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/381296

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

test_id

\d+

Integer

ID of the test

Filters

Name
Datatype
Description
Pattern
Default

_max_per_page

integer

Limit of items per page

10

_page

integer

Page of the collection

10

Headers

Name
Required
Description

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/variations

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

test_id

\d+

Integer

ID of the test

Headers

Name
Required
Description

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/491035

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

test_id

\d+

Integer

ID of the test

Headers

Name
Required
Description

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/modifications

Requirements

Name
Requirements
Type
Description

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

Name
Datatype
Description
Pattern
Default

_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

Name
Required
Description

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/2064015

Requirements

Name
Requirements
Type
Description

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

Name
Required
Description

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 /api/core/accounts/[account_id]/tests/[test_id]/toollinks

https://api.abtasty.com/api/core/accounts/41902/tests/381301/toollinks

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

test_id

\d+

Integer

ID of the test

Filters

Name
Datatype
Description
Default

_page

integer

Page of the collection

1

_max_per_page

integer

Limit of items per page

10

Headers

Name
Required
Description

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 /api/core/accounts/[account_id]/tests/[test_id]/toollinks/[toollinks_id]

https://api.abtasty.com/api/core/accounts/41902/tests/381301/toollinks/114115

Requirements

Name
Requirements
Type
Description

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

Name
Required
Description

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_modifications

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

test_id

\d+

Integer

ID of the test

Filters

Name
Datatype
Description
Pattern
Default

_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

Name
Required
Description

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_statistics

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

Headers

Name
Required
Description

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:

Play a test

PATCH /api/interface/accounts/[account_id]/tests/[test_id]/play

https://api.abtasty.com/api/interface/accounts/41902/tests/381301/play
{
  "mode":"prod"
}

if everything was going well, it will return a success response with a 204.

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

test_id

\d+

Integer

ID of the test

Parameters

Name
Required
Description
Format

mode

false

Should it be in prod or preprod (prod if no parameters passed in the JSON)

preprod|prod

Headers

Name
Required
Description

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)

Pause a test

PATCH /api/interface/accounts/[account_id]/tests/[test_id]/pause

https://api.abtasty.com/api/interface/accounts/41902/tests/381301/pause

if everything went well, it will return a success response with a 204.

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

test_id

\d+

Integer

ID of the test

Headers

Name
Required
Description

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=1

if you correctly have access to the account, it will return a 200.

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

Filters

Name
Datatype
Description
Pattern
Default

_max_per_page

Integer

Limit of items per page

10

_page

integer

Page of the collection

1

Headers

Name
Required
Description

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/132419

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

membership_id

\d+

Integer

ID of the user

Headers

Name
Required
Description

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/membership

And 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

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

Parameters

Name
Required
Description
Format

email

true

Email of the new user

email address

role

true

Role of the user

[admin|user|creator|viewer]

Headers

Name
Required
Description

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/132419

And the body you need to insert:

{
  "role":"user"
}

if you correctly have access to the account, it will return a 204 no content.

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

membership_id

\d+

Integer

ID of the user

Parameters

Name
Required
Description
Format

email

true

Email of the new user

email address

role

true

Role of the user

[admin|user|creator|viewer]

Headers

Name
Required
Description

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/132419

The request will return a 204 No Content if successful

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

membership_id

\d+

Integer

ID of the user

Headers

Name
Required
Description

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-rebuild

The request will return a 204 No Content if successful

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

Headers

Name
Required
Description

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-clear

The request will return a 204 No Content if successful

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

Headers

Name
Required
Description

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.

Get the framework checksum

GET /api/v1/accounts/[account_id]

https://api.abtasty.com/api/v1/accounts/41902

Requirements

Name
Requirements
Type
Description

account_id

\d+

integer

ID of the account

Headers

Name
Required
Description

Content-Type

true

application/json

Authorization

true

authorization token (example: Bearer [token]

Status Code

Status code
Description

[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?