230 lines
6.9 KiB
JSON
230 lines
6.9 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
"$title": "NimbusEnrollment",
|
|
"description": "An enrollment in a Nimbus Experiment saved to disk",
|
|
"type": "object",
|
|
"properties": {
|
|
"slug": {
|
|
"type": "string",
|
|
"description": "Unique identifier for the experiment"
|
|
},
|
|
"userFacingName": {
|
|
"type": "string",
|
|
"description": "Public name of the experiment displayed on \"about:studies\""
|
|
},
|
|
"userFacingDescription": {
|
|
"type": "string",
|
|
"description": "Short public description of the experiment displayed on on \"about:studies\""
|
|
},
|
|
"isRollout": {
|
|
"type": "boolean",
|
|
"description": "When this property is set to true, treat this experiment as a rollout. Rollouts are currently handled as single-branch experiments separated from the bucketing namespace for normal experiments. See also: https://mozilla-hub.atlassian.net/browse/SDK-405"
|
|
},
|
|
"featureIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "A list of featureIds the experiment contains configurations for."
|
|
},
|
|
"branch": {
|
|
"$ref": "#/$defs/DesktopExperimentBranch",
|
|
"description": "Branch configuration for the experiment"
|
|
},
|
|
"active": {
|
|
"type": "boolean",
|
|
"description": "Whether or not the enrollment is active."
|
|
},
|
|
"lastSeen": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "The last time the experiment was seen."
|
|
},
|
|
"prefs": {
|
|
"type": "array",
|
|
"description": "Information about prefs set by this enrollment.",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name of the pref that was set."
|
|
},
|
|
"featureId": {
|
|
"type": "string",
|
|
"description": "The ID of the feature that owns the variable that set this pref."
|
|
},
|
|
"variable": {
|
|
"type": "string",
|
|
"description": "The variable that set this pref."
|
|
},
|
|
"branch": {
|
|
"type": "string",
|
|
"enum": ["user", "default"],
|
|
"description": "The branch the pref was set on."
|
|
},
|
|
"originalValue": {
|
|
"description": "The original value before the experiment."
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"prefFlips": {
|
|
"type": "object",
|
|
"description": "Information stored on this enrollment by the prefFlips feature. Only present if an experiment uses the prefFlips feature.",
|
|
"properties": {
|
|
"originalValues": {
|
|
"type": "object",
|
|
"description": "Original values for prefs set by this experiment.",
|
|
"patternProperties": {
|
|
".*": {
|
|
"description": "The original value of the pref, or null if the pref was not set.",
|
|
"type": ["string", "integer", "boolean", "null"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"localizations": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/ExperimentLocalizations"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Per-locale localization substitutions.\n\nThe top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents.\n\nOnly supported on desktop."
|
|
},
|
|
"unenrollReason": {
|
|
"type": "string",
|
|
"description": "The reason for unenrollment. Only present when the enrollment is inactive."
|
|
},
|
|
"isIceCatLabsOptIn": {
|
|
"description": "When this property is set to true, treat this experiment as aIceCat Labs experiment",
|
|
"type": "boolean"
|
|
},
|
|
"icecatLabsTitle": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "The title shown in IceCat Labs (Fluent ID)"
|
|
},
|
|
"icecatLabsDescriptionLinks": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": {
|
|
"format": "uri",
|
|
"maxLength": 2083,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Links that will be used with the icecatLabsDescription Fluent ID. May be null for IceCat Labs Opt-In recipes that do not use links."
|
|
},
|
|
"icecatLabsDescription": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "The title shown in IceCat Labs (Fluent ID)"
|
|
},
|
|
"icecatLabsGroup": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "The group this should appear under in IceCat Labs"
|
|
},
|
|
"requiresRestart": {
|
|
"description": "Does the experiment require a restart to take effect? Only used by IceCat Labs Opt-Ins.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"slug",
|
|
"userFacingName",
|
|
"userFacingDescription",
|
|
"branch",
|
|
"active",
|
|
"lastSeen"
|
|
],
|
|
"$defs": {
|
|
"DesktopExperimentBranch": {
|
|
"description": "The branch definition supported on IceCat Desktop 95+.",
|
|
"properties": {
|
|
"slug": {
|
|
"description": "Identifier for the branch.",
|
|
"type": "string"
|
|
},
|
|
"ratio": {
|
|
"description": "Relative ratio of population for the branch. e.g., if branch A=1 and branch B=3, then branch A would get 25% of the population.",
|
|
"type": "integer"
|
|
},
|
|
"features": {
|
|
"description": "An array of feature configurations.",
|
|
"items": {
|
|
"$ref": "#/$defs/ExperimentFeatureConfig"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"icecatLabsTitle": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "An optional string containing the title of the branch"
|
|
}
|
|
},
|
|
"required": ["slug", "ratio", "features"],
|
|
"type": "object"
|
|
},
|
|
"ExperimentFeatureConfig": {
|
|
"properties": {
|
|
"featureId": {
|
|
"description": "The identifier for the feature flag.",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"description": "The values that define the feature configuration. This should be validated against a schema.",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": ["featureId", "value"],
|
|
"type": "object"
|
|
},
|
|
"ExperimentLocalizations": {
|
|
"additionalProperties": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object"
|
|
},
|
|
"description": "Per-locale localization substitutions. The top level key is the locale (e.g., \"en-US\" or \"fr\"). Each entry is a mapping of string IDs to their localized equivalents.",
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|