Toggles

FREEMIUM
By benderTheCrime | Updated 14日前 | Tools
Health Check

N/A

README

Toggles

Really simple, cross-platform experiments. Create feature flags, A/B tests, and other toggles via API and remotely configure your apps.

Getting Started

No API Auth setup is required. Make requests the way you normally would with RapidAPI, following the definition for each endpoint.

Create an Experiment

POST /experiment/

Use the “Create Experiment” endpoint to create your first experiment. Set a percentage of users who should see this experiment with the “percent” parameter. For a true/false experiment, set the percent to 100.

Make sure to keep track of the experiment’s id.

Give your Experiment Context.

POST /experiment/{id}/contexts/

If you want to use your experiment as a feature flag, you can skip this step. If you would like your experiment to always be active for a specific audience, add user context to your experiment using the “Update Experiment Contexts” API.

An experiment context can be unique to a single user, like an email or a user id, or it can apply to a whole demographic of users, like a geography or a user type.

Call the “Is Experiment Active” endpoint from your code.

GET /experiment/{id}/active
POST /experiment/{id}/active

To see your experiment in action, make a call to the “Is Experiment Active” endpoint from your code.

This will bucket the user into a specific category of the experiment if it is a percent based experiment or return a simple true/false for experiments that are enabled at 100 percent. For these types of experiments, this endpoint can be called as a GET.

For experiments which check user context, this endpoint takes a post body with the following shape:

{
  "context": {
    "uniqueId": "uniqueId"
  }
}

For these types of experiments, “Is Experiment Active” can be called as a POST.

Please note that these endpoionts implement heavy caching: you may not see changes reflected for up to five minutes after they are made in the API.

Experiments will also provide information about experiment state in the form of a response cookie (_bexp_{uuid}_{userSlug}) and a header (X-Experiment-State) which you may pass through to other requests to preserve experiment audience placement.

Postman

See the API Documentation on Postman:

https://web.postman.co/collections/7911503-5b3eaafd-10bb-4956-833b-ed8275648c44?version=latest&workspace=8e7ad216-4c73-473f-871e-510a85d267d8

Followers: 0
Resources:
Product Website
API Creator:
Rapid account: Bender The Crime
benderTheCrime
benderTheCrime
Log In to Rate API
Rating: 5 - Votes: 1