Authorization is done with an oauth token from the FxA Oauth Server
Returns a javascipt bundle for running experiments locally.
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
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"]
}
'
A json object with zero or more keys
{
"highlyExperimentalFeatureEnabled": true,
"fontSize": 12
}
Same as /v1/{ app }/variables
but only returns the variable
specified.
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"]
}
'
A json object with zero or more keys
{
"colorScheme": "spacegray"
}
Get all the subject attributes used by the current set of experiments
curl -v "https://ab.accounts.firefox.com/v1/foo/attributes"
An array of subject attribute names
["uid","sessionId"]