xHyroM

Experiments

This section of the documentation will cover how to fetch experiments.

Accessible on https://dux.xhyrom.dev/v2/experiments

Experiment Object

Represents an experiment

Experiment Structure:

fieldtypedescription
dataexperiment data structureThe data of the experiment
rollout?experiment rollout structureThe rollout of the experiment

Data Object

Represents the data of an experiment

Experiment Data Structure:

fieldtypedescription
hashstringHash of the experiment (if the experiment has no id, this will be a hash)
id *?stringId of the experiment
label *?stringHuman-readable label of the experiment
kind **stringKind of the experiment
description?array of stringNames of buckets
buckets?array of integersIds of available buckets
config_keys?array of stringKeys of the config

* Also included if you’re using ?only_keys=true query parameter.
** Can be guild if the experiment is guild-specific, user if the experiment is user-specific.
*** Everything is included in the data field, if you’re not using ?also_with_unknown_ids=true query parameter.

Rollout Object

Represents the rollout of an experiment

Rollout Structure:

fieldtypedescription
revisionintegerCurrent version fo the rollout
populationsarray of rollout populationThe experiment rollout’s populations
overrides *map[string][array of string]The experiment rollout’s overrides
overrides_formattedarray of rollout populationAdditional experiment rollout’s populations

* Map key is bucket id and value is array of guild ids

Rollout Population Object

Represents a population of an experiment rollout. The population object specifies a set of filters and ranges of positions needed to fit into particular buckets.

Rollout Population Structure:

fieldtypedescription
bucketsmap[string][population bucket]The population buckets
filtersarray of population filterPopulation filters

Population Bucket Object

Represents a bucket of a population of an experiment rollout. Bucket contains a rollout.

Population Bucket Structure:

fieldtypedescription
rolloutarray of population bucket rolloutThe bucket rollouts (ranges)

Population Bucket Rollout Object

Represents a rollout of a bucket of a population of an experiment rollout. Rollout contains a range, start and end.

Population Bucket Rollout Structure:

fieldtypedescription
startintegerThe start of this range
endintegerThe end of this range

Population Filter Object

Represents a filter of a population of an experiment rollout.

Population Filter Structure:

fieldtypedescription
typestringThe filter type

type is guild_has_feature

The guild features required for eligiblity

fieldtypedescription
features?array of stringContains Guild Features

type is guild_id_range

The range of snowflake resource Ids that are eligible

fieldtypedescription
min_id?integerMinimum guild id
max_idintegerMaximum guild id

type is guild_member_count_range

The range of guild member counts that are eligible

fieldtypedescription
min_count?integerMinimum member count
max_countintegerMaximum member count

type is guild_ids

The list of snowflake resource IDs that are eligible

fieldtypedescription
ids?array of stringContains Guild Ids

type is guild_hub_types

The types of hubs that is eligible

fieldtypedescription
hub_types?array of integerTypes of hubs
  1. Default
  2. High School
  3. College

type is guild_has_vanity_url

Whether a vanity is or is not required for eligibility

fieldtypedescription
has_vanity?booleanWhether the guild has vanity url

type is guild_in_range_by_hash

If the guild experiment hash (murmurhash v3 unsigned of experiment_name:guild_id % 1e4) is greater than hash_key, it is eligible

fieldtypedescription
hash_key?numberMinimum hash key
target?numberUnknown

Fetching all experiments

You can fetch experiments from the API by sending a GET request to https://dux.xhyrom.dev/v2/experiments.

Be Warned
Unfortunately, due to capacity issues, the query parameters in the URL do not work. All experiments are always returned.

Query parameters:

NameTypeDescription
also_with_unknown_idsbooleanThis will include also experiments without id, just hash
only_keysbooleanThis will only return the keys of the experiments (label, id)
has_rolloutbooleanThis will only return experiments with rollout
kind *array of stringThis will only return experiments with the specified kind

* If you want multiple kinds, you can separate them with a comma (,)

GET https://dux.xhyrom.dev/v2/experiments

Returns array of Experiment Object

Fetching experiment

You can fetch a specific experiment from the API by sending a GET request to https://dux.xhyrom.dev/v2/experiments/:experimentId.

You can use same query parameters as in Fetching all experiments

GET https://dux.xhyrom.dev/v2/experiments/:experimentId

Returns Experiment Object