acceptable-helmet-59379
12/11/2024, 4:50 PMheaders = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
payload = {
"datasourceId": "",
"assignmentQueryId": "",
"trackingKey": experiment_id_key,
"name": experiment_id_key,
"project": project_id,
"hypothesis": "",
"description": "",
"tags": [],
"metrics": [],
"guardrailMetrics": [],
"owner": '<mailto:qwerty123@gmail.com|qwerty123@gmail.com>',
"archived": False,
"status": "running",
"autoRefresh": True,
"hashAttribute": "id",
# "fallbackAttribute": "string",
"hashVersion": 2,
"releasedVariationId": "",
"excludeFromPayload": True,
"variations": [
{
"id": "var_m1z8651l",
"name": "Control",
"key": "0",
"screenshots": [],
"description": ''
},
{
"id": "var_m1z8651m",
"name": "Variation 1",
"key": "1",
"screenshots": [],
"description": ''
}
],
"phases": [
{
"name": "string",
"dateStarted": "2019-08-24T14:15:22Z",
"seed": experiment_id_key,
"coverage": 1,
"trafficSplit": [
{"variationId": "0", "weight": 0.5},
{"variationId": "1", "weight": 0.5}
],
"namespace": {
"namespaceId": "",
"range": [
0,
0.5
],
"enabled": False
},
"targetingCondition": "",
"reason": "",
"condition": "{\"flowId\": \"1111\", \"language\": \"en\"}",
"savedGroupTargeting": [],
"variationWeights": [
0.5,
0.5
],
}
]
}
response = <http://requests.post|requests.post>(f"{api_url}", headers=headers, data=json.dumps(payload))
fresh-football-47124
fresh-football-47124
fresh-football-47124
acceptable-helmet-59379
12/13/2024, 9:08 AMacceptable-helmet-59379
12/13/2024, 11:16 AMacceptable-helmet-59379
12/25/2024, 10:43 AM