Widgets

Stop an A/B test

Ends the test keeping one widget: the one named in winner_id, or without it the test's leader_id. The test is removed, the winner stays as it was (on or off), every other widget is turned off and kept. The admin's Stop; like the admin, it needs two or more widgets in the test.

post/v1/sites/{site_id}/widgets/ab-tests/{test_id}/stop

Request

  • Base URL
    https://api.getsitecontrol.com
  • Auth
    HTTP bearer

Path parameters

site_idinteger required
test_idinteger required

A/B test id from List A/B tests

Headers

Idempotency-Keystring

Makes a retry of a POST safe: a repeat with the same key, body and GSC-Version returns the stored response with Idempotency-Replayed: true instead of running again. The key protects against repeated execution while the key store works. Saving the change and storing the response under the key are not atomic: if the process or the key store fails between them, the change is kept, the key is released after 15 minutes and a retry runs the request again. After a timeout or a 5xx, read the resource to check the result before retrying. 5xx and 429 responses and responses over 256 KB are not stored, so a repeat runs the request again. A key is kept for 24 hours. The same key with another body or version is 422; a repeat while the first request runs is 409.

Request body

winner_idinteger nullable

The widget to keep, one of the test's widgets; omitted: the test's leader_id

Response

Successful Response

loser_idsinteger[] required

The other widgets, now turned off and kept

Changes

No recorded changes to this operation across all 1 revision of this API.