Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

able

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

able

A/B testing server

  • 0.2.0
  • npm
  • Socket score

Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

able A/B testing service

Roadmap

API Endpoints

Authorization is done with an oauth token from the FxA Oauth Server

GET /v1/{ app }/experiments.bundle.js

Returns a javascipt bundle for running experiments locally.

POST /v1/{ app }/variables

Returns an object mapping configuration variables to values based on currently running experiments. Only variables affected by experiments are returned therefore the result may be an empty object.

Parameters

  • subject - (optional) an object with subject attributes used by experiments
  • enrolled - (optional) an array of experiment names that this subject is enrolled in

Authorization is optional. When used the service stores which experiments the user is enrolled in, so the enrolled parameter is not required.

The user id from the oauth token is made available to experiments automatically if the request is authenticated, so it does not need to be set in the subject

Request

curl -v \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 558f9980ad5a9c279beb52123653967342f702e84d3ab34c7f80427a6a37e2c0" \
"https://ab.accounts.firefox.com/v1/fxa_content_server/variables" \
-d '
{
  "subject": {
    "postId": 123
  },
  "enrolled": ["test1"]
}
'

Response

A json object with zero or more keys

{
  "highlyExperimentalFeatureEnabled": true,
  "fontSize": 12
}

POST /v1/{ app }/variables/{ variable }

Same as /v1/{ app }/variables but only returns the variable specified.

Request

curl -v \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 558f9980ad5a9c279beb52123653967342f702e84d3ab34c7f80427a6a37e2c0" \
"https://ab.accounts.firefox.com/v1/foo/variables/colorScheme" \
-d '
{
  "subject": {
    "postId": 123
  },
  "enrolled": ["test1"]
}
'

Response

A json object with zero or more keys

{
  "colorScheme": "spacegray"
}

GET /v1/{ app }/attributes

Get all the subject attributes used by the current set of experiments

Request

curl -v "https://ab.accounts.firefox.com/v1/foo/attributes"

Response

An array of subject attribute names

["uid","sessionId"]

FAQs

Package last updated on 11 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc