analytics, editSettings
The captured settings can later be applied to the control index with the applyVariantSettings operation, and read back with the getABTestSettings operation.
The A/B test must have reached 80% of its planned duration. Earlier requests return 400.
Settings can only be captured once per A/B test. A second request returns 409.
synonyms and enableRules are not captured, so applying the captured settings never changes them on the control index.
Usage
// Initialize the client
var client = new AbtestingV3Client(
new AbtestingV3Config(
"ALGOLIA_APPLICATION_ID",
"ALGOLIA_API_KEY",
"ALGOLIA_APPLICATION_REGION"
)
);
// Call the API
await client.SaveVariantSettingsAsync(
42,
2,
new SaveSettingsRequest { SaveFeaturesSettings = true }
);
// Initialize the client
final client = AbtestingV3Client(
appId: 'ALGOLIA_APPLICATION_ID',
apiKey: 'ALGOLIA_API_KEY',
region: 'ALGOLIA_APPLICATION_REGION');
// Call the API
await client.saveVariantSettings(
id: 42,
variantId: 2,
saveSettingsRequest: SaveSettingsRequest(
saveFeaturesSettings: true,
),
);
// Initialize the client with your application region, eg. abtestingV3.ALGOLIA_APPLICATION_REGION
client, err := abtestingV3.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", abtestingV3.US)
if err != nil {
// The client can fail to initialize if you pass an invalid parameter.
panic(err)
}
// Call the API
err = client.SaveVariantSettings(client.NewApiSaveVariantSettingsRequest(
42, 2,
abtestingV3.NewEmptySaveSettingsRequest().SetSaveFeaturesSettings(true)))
if err != nil {
// handle the eventual error
panic(err)
}
// Initialize the client
AbtestingV3Client client = new AbtestingV3Client("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION");
// Call the API
client.saveVariantSettings(42, 2, new SaveSettingsRequest().setSaveFeaturesSettings(true));
// Initialize the client
// Replace 'us' with your Algolia Application Region
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY').initAbtestingV3({ region: 'us' });
// Call the API
await client.saveVariantSettings({ id: 42, variantId: 2, saveSettingsRequest: { saveFeaturesSettings: true } });
// Initialize the client
val client =
AbtestingV3Client(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = "ALGOLIA_APPLICATION_REGION",
)
// Call the API
client.saveVariantSettings(
id = 42,
variantId = 2,
saveSettingsRequest = SaveSettingsRequest(saveFeaturesSettings = true),
)
// Initialize the client
$client = AbtestingV3Client::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY', 'ALGOLIA_APPLICATION_REGION');
// Call the API
$client->saveVariantSettings(
42,
2,
['saveFeaturesSettings' => true,
],
);
# Initialize the client
# In an asynchronous context, you can use AbtestingV3Client instead, which exposes the exact same methods.
client = AbtestingV3ClientSync(
"ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION"
)
# Call the API
client.save_variant_settings(
id=42,
variant_id=2,
save_settings_request={
"saveFeaturesSettings": True,
},
)
# Initialize the client
client = Algolia::AbtestingV3Client.create("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
# Call the API
client.save_variant_settings(42, 2, Algolia::AbtestingV3::SaveSettingsRequest.new(save_features_settings: true))
// Initialize the client
val client = AbtestingV3Client(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = Option("ALGOLIA_APPLICATION_REGION")
)
// Call the API
Await.result(
client.saveVariantSettings(
id = 42,
variantId = 2,
saveSettingsRequest = SaveSettingsRequest(
saveFeaturesSettings = Some(true)
)
),
Duration(100, "sec")
)
// Initialize the client
let client = try AbtestingV3Client(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY", region: .us)
// Call the API
try await client.saveVariantSettings(
id: 42,
variantId: 2,
saveSettingsRequest: SaveSettingsRequest(saveFeaturesSettings: true)
)
See the full API reference
For more details about input parameters
and response fields.