Welcome to ABRouter docs. It's a tool for AB-testing your application on the back-end side.
Running experiments is performs through simple HTTPS-request to ABRouter server.
Before making a request you need to prepare the following:
Also you can find request template in your personal dashboard. Choose experiment, then click "Edit", scroll down and copy "Try link"
So, after preparing we're ready to make a request. Requesting to run experiment for user is pretty simple. Let's make it:
POST https://abrouter.com/api/v1/experiment/runWith
Authorization 2c0d967a245c04b5f67ccc059af91257ba0249acdcb0d65b8583b9588227fb709dae3c043a313e71
{ "data": { "type": "experiment-run", "attributes": { "userSignature": "asds21" }, "relationships": { "experiment": { "data": { "id": "B95AC000-0000-0000-00005030", "type": "experiments" } } } } }Will respond the following:
{ "data": { "type": "experiment_branch_users", "id": "26DAA100-0000-0000-00006E5F", "attributes": { "run-uid": "button-green", "branch-uid": "green", "experiment-uid": "button" }, "relationships": { "experiment_user": { "data": { "type": "experiment_user", "id": "9A187100-0000-0000-0000CC34" } }, "experiment_id": { "data": { "type": "users", "id": "B95AC000-0000-0000-00005030" } }, "experiment_branch_id": { "data": { "type": "users", "id": "BD950100-0000-0000-00007B95" } } } } }
Review our guide how to ABRouter use with PHP clients: