Flag
A Flag is a switch, evaluated per Visitor, Customer, or request, that selects which copy or behavior they get.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
key | string | required | The name code reads. |
rules | json | Who gets which value, including percentage splits. |
Object
{
"$id": "https: //api.sb/ quietcopy.com/ flags/ flag_1",
"$type": "Flag",
"key": "new-checkout",
"rules": {}
}Relationships
- A Flag assigns many Experiments: Flags split units across an Experiment’s Variants and log each assignment with its propensity.
assigns, inverseassignsWith.
Verbs
createCreates a Flag.POST /{namespace}/flagsgetReturns one Flag by id.GET /{namespace}/flags/{id}listReturns Flags, newest first, one page at a time.GET /{namespace}/flagsupdateChanges the given properties of a Flag.PATCH /{namespace}/flags/{id}deleteDeletes a Flag; its history is kept.DELETE /{namespace}/flags/{id}evaluateEvaluate returns the Variant a Flag assigns one unit, the same one every time, and records the Exposure with every option and its propensity.POST /{namespace}/flags/{flag}/evaluate
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Flag.create | Yes | Yes | Yes | No |
Flag.get | Yes | Yes | Yes | Yes |
Flag.list | Yes | Yes | Yes | Yes |
Flag.update | Yes | Yes | Yes | No |
Flag.delete | Yes | Yes | Yes | No |
Flag.evaluate | Yes | Yes | Yes | No |
Call it
Evaluate the latest flag.Example
The Flag pricing-page-v2 shows the new pricing Page to 50% of Visitors and the prior Page to the rest.