Experiments

Start a draft bandit. Its targeting rule is published serving every arm equally, and each refresh then shifts traffic toward the arms that do best. The bandit starts exactly as it is configured; set it up with PATCH /api/v2/experiments/bandits/{bandit_id} first. It needs a flag, at least two arms, a subject type, a metric, and an exposure SQL model. The request is idempotent: a bandit that is already running still returns 204, so a retry after a timeout is safe. Stop is not idempotent. A start is blocked when the flag environment requires an approval or a pending change request touches the flag's targeting rules; retrying alone does not resolve an approval requirement. Bandits must be enabled for the organization.

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

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

Response

The bandit is running. Get the bandit to read its status and active policy.

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