Experiments

Stop a running or paused bandit. From then on its targeting rule serves served_variant_key to everyone, overriding any configured fallback, and the bandit stops refreshing. served_variant_key can be any of the flag's variants. Stopping can't be reversed and is not idempotent: stopping a bandit that has already stopped or completed returns 409. Bandits must be enabled for the organization.

post/api/v2/experiments/bandits/{bandit_id}/stop

Request

  • Base URL
    https://api.datadoghq.com
  • Auth
    • API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
    • or OAuth 2
      Authorization code/oauth2/v1/authorize
      Token URL/oauth2/v1/token
      Scopesproduct_analytics_experiments_write

Path parameters

bandit_idstring uuid required

The UUID of the bandit.

Example:4b1f3c2e-8d5a-4f6b-9c7e-1a2b3c4d5e6f

Request body

Example request

{
  "data": {
    "attributes": {
      "served_variant_key": "green"
    },
    "type": "stop-bandit-request"
  }
}

Response

The bandit is stopped and serves the chosen variant.

Changes

    • warning

      the optional response header X-RateLimit-Limit removed for the status 429

    • warning

      the optional response header X-RateLimit-Period removed for the status 429

    • warning

      the optional response header X-RateLimit-Remaining removed for the status 429

    1 more change in this revision