https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
b

brief-pager-93130

12/26/2023, 5:19 AM
Concerning endpoint
<https://api.growthbook.io/api/v1/features>
, the API documentation specifies that an environment of a feature can have four types of rules, i.e.
force
,
rollout
,
experiment-ref
and
experiment
. However, after playing around with GrowthBook UI setting up different experiments, I cannot reproduce any case in which the latest type of rule
experiment
would be returned. Furthermore, in endpoint
POST /features
to create a single feature, the API documentation specifies only the three first types of rules as possible rule types, i.e.
force
,
rollout
and
experiment-ref
. Question: Does it all mean the rule type
experiment
has been deprecated and we can assume it is not going to be returned by the API ?
r

rhythmic-agent-34208

12/29/2023, 8:25 PM
Yes, the rule type “experiment” has been deprecated in the API in favor of a new rule type called “experiment-ref”. This change was introduced in version 2.5 of GrowthBook. The new “experiment-ref” rule type uses a foreign key to an Experiment object (experimentId) instead of defining everything inline as was done previously. This change was made to streamline the process of managing experiments and their associated rules. The new structure allows for better separation of concerns, where the Experiment object contains all the targeting and rollout information, and the feature rules simply reference these experiments.
b

brief-pager-93130

12/31/2023, 11:47 AM
@brief-honey-45610 Thank you so much. So if I access GrowthBook API through a brand-new project, I should not expect any more to see the 'experiment' type or rule, correct?
r

rhythmic-agent-34208

01/08/2024, 6:49 PM
Correct
3 Views