Skip to main content
POST
/
v1
/
get_ranked_list
Get Ranked List for Contextual Bandit
curl --request POST \
  --url https://api.statsig.com/v1/get_ranked_list \
  --header 'Content-Type: application/json' \
  --header 'statsig-api-key: <api-key>' \
  --data '{
  "configName": "product_recommendation_bandit",
  "user": {
    "userID": "user-123"
  }
}'
[
  {
    "name": "variant_a",
    "value": {
      "recommendation_algorithm": "collaborative_filtering"
    },
    "rule_id": "rule_123",
    "score": 0.85
  },
  {
    "name": "variant_b",
    "value": {
      "recommendation_algorithm": "content_based"
    },
    "rule_id": "rule_124",
    "score": 0.72
  }
]

Authorizations

statsig-api-key
string
header
required

SDK API key (Server Secret or Client SDK Key)

Body

application/json
configName
string
required

Name of the contextual bandit (autotune) experiment

Required string length: 2 - 100
user
object

User object containing identification and attributes for evaluation. At minimum, provide at least one identifier.

statsigMetadata
object

SDK metadata for tracking SDK type, version, and other diagnostic information

Example:
{
"sdkType": "js-client",
"sdkVersion": "4.20.0"
}

Response

Ranked list of variants

Array of variants ranked by predicted performance

name
string
required

Variant name

value
object
required

Variant parameter values

rule_id
string | null
required

Rule ID for this variant

score
number
required

Predicted performance score for this variant

I