示例数据文件

云眼Less than 1 minute

示例数据文件

该示例显示了数据文件可能包含的内容。使用它来了解在云眼灰度发布(特性标帜)AB实验中传递的配置信息。

数据文件是一个 JSON 字符串,用于描述在给定环境中运行的所有标帜规则以及受众和属性等依赖实体。通常,不需要直接与数据文件交互。SDK 公开在内部对其进行操作的方法。

JSON

{ 
    "accountId": "12345",     
    "anonymizeIP": false,     
    "botFiltering": false,     
    "projectId": "23456",     
    "revision": "6",     
    "version": "4",     
    
    "experiments": [{"key": "my_experiment", "id": "45678", "layerId": "34567", "status": "Running","variations": [{ "id": "56789", "key": "control", "variables": []}, {"id": "67890", "key": "treatment", "variables": []}], "trafficAllocation": [{"entityId": "56789", "endOfRange": 5000 },  {"entityId": "67890", "endOfRange": 10000 } ], "audienceIds": [], "forcedVariations": {}} ],    
    
    "featureFlags": [ {"experimentIds": [], "id": "56789", "key": "price_filter",  "rolloutId": "67890", "variables": [{ "defaultValue": "100",  "id": "12345", "key": "min_price", "type": "integer"} ] }],     
    
    "events": [{"experimentIds": [ "34567"], "id": "56789", "key": "my_conversion"}],     
    
    "audiences": [],     
    "attributes": [],     
    "groups": [],  


    "rollouts": [{"experiments": [{ "audienceIds": [], "forcedVariations": {}, "id": "23456",  "key": "23456", "layerId": "34567", "status": "Running",  "trafficAllocation": [ {  "endOfRange": 5000,  "entityId": "45678" } ], "variations": [{ "featureEnabled": true, "id": "56789", "key": "56789", "variables": [ { "id": "67890",  "value": "100" }]}]} ], "id": "78901" } ],     
    
    "variables": [] 
    
}
Last update:
Contributors: “zhangweixue”,zhangweixue