Experiments

List bandit policies

Changed on

List the policies a bandit has served, newest first by default, including the policy it serves after it ends. Each policy is the traffic split SDKs served from when it was applied until the next one. Exposures log the policy's ID as bandit.policy_id, so the history tells you the split behind each exposure. Exposures logged after the bandit ends have no policy ID. filter[from] and filter[to] keep the policies in effect during the range, including the one already in effect at filter[from]. Bandits must be enabled for the organization.

get/api/v2/experiments/bandits/{bandit_id}/policies

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_read

Path parameters

bandit_idstring uuid required

The UUID of the bandit.

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

Query parameters

filter[from]string date-time

Return only the policies in effect at or after this RFC 3339 time (inclusive), including the one already in effect at it.

Example:2026-10-01T00:00:00Z

Return only the policies in effect at or after this RFC 3339 time (inclusive), including the one already in effect at it.

filter[to]string date-time

Return only the policies applied before this RFC 3339 time (exclusive).

Example:2026-11-01T00:00:00Z
page[offset]integer

Number of results to skip for pagination. Defaults to 0 when omitted.

page[limit]integer

Maximum number of results to return. Defaults to 25 when omitted, and is capped at 50 (larger values are clamped to 50). The response includes meta.page (with total) and pagination links.

Maximum number of results to return. Defaults to 25 when omitted, and is capped at 50 (larger values are clamped to 50). The response includes meta.page (with total) and pagination links.

sortstring

applied_at for oldest first, or -applied_at for newest first. Defaults to -applied_at.

Response

OK

Example response

{
  "data": [
    {
      "attributes": {
        "applied_at": "2026-10-30T02:15:00Z",
        "config_version": 2,
        "is_active": true,
        "kind": "ADAPTIVE",
        "policy_number": 9,
        "reason": "REFRESH",
        "refresh_id": "bb0e8400-e29b-41d4-a716-446655440000",
        "variants": [
          {
            "feature_flag_variant_id": "770e8400-e29b-41d4-a716-446655440001",
            "probability": 0.3,
            "variant_key": "blue"
          }
        ]
      },
      "id": "dd0e8400-e29b-41d4-a716-446655440000",
      "type": "bandit-policies"
    }
  ]
}

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