curl -X POST "https://api.confidence.dev/v1/workflows/abtest/instances" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"displayName": "A/B test with exposure filter",
"flags": {
"targetingKeySelector": "targeting_key"
},
"stats": {
"testHorizonStrategy": "SEQUENTIAL"
},
"abtest": {
"treatments": [
{
"variant": "flags/page-feature-flag/variants/control",
"weight": "5000"
},
{
"variant": "flags/page-feature-flag/variants/variant",
"weight": "5000"
}
]
},
"metrics": {
"assignmentTable": "assignmentTables/my-assignment-table",
"entity": "entities/user",
"bucket": "HOURS",
"filters": [
{
"displayName": "home",
"filter": {
"criteria": {
"page-1": {
"attribute": {
"attribute": "page",
"eqRule": {
"value": {
"stringValue": "home"
}
}
}
}
},
"expression": {
"and": {
"operands": [{"ref": "page-1"}]
}
}
},
"factTable": "factTables/my-fact-table"
}
],
"metrics": [
{
"metric": "metrics/conversion-rate",
"metricRole": {
"metricKind": "SUCCESS",
"minimumDetectableEffect": 0.01
},
"preferredDirection": "INCREASE"
}
]
}
}'