Skip to main content
Solved

Evaluation REST API not working


Hey everyone! Here is a situation that I am facing beign new using amplitude. We’re trying to use amplitude Evaluation REST API to get users’ variant for a feature flag we’ve created. All seems to be alright, deployment key is created, feature flag is created and active but for some reason when I try to get user variant it always returns an empty object

https://www.docs.developers.amplitude.com/experiment/apis/evaluation-api/#example

I’ve tested from that page and also doing a cURL. 

Any help would be awesome! Thanks

Best answer by eddie.gaona

Hello @Daniel Barria hope you are well!

 

I looked at one of the Feature Flags enabled in your organization and noticed that it’s only released to 40% of users. This would mean that more users would have an empty object or off for the feature flag than on.

 

Looking at the project the FF belongs to doesn’t seem there are many unique users in the past 7 days (Since the FF was created on Jan 18th) with only 4 unique users.  I would suggest using the Evaluation API UI and there will be users who get the on value: https://www.docs.developers.amplitude.com/experiment/apis/evaluation-api/#example.

 

View original
Did this topic help you find an answer to your question?

3 replies

Esther Trapadoux
Community Manager
Forum|alt.badge.img+9

@Daniel Barria thanks for writing in and apologies for the delay. Will ping you via DM to try and troubleshoot this.


eddie.gaona
Team Member
Forum|alt.badge.img+9
  • Amplitude Support
  • 161 replies
  • Answer
  • January 22, 2024

Hello @Daniel Barria hope you are well!

 

I looked at one of the Feature Flags enabled in your organization and noticed that it’s only released to 40% of users. This would mean that more users would have an empty object or off for the feature flag than on.

 

Looking at the project the FF belongs to doesn’t seem there are many unique users in the past 7 days (Since the FF was created on Jan 18th) with only 4 unique users.  I would suggest using the Evaluation API UI and there will be users who get the on value: https://www.docs.developers.amplitude.com/experiment/apis/evaluation-api/#example.

 


Hey there! didn’t know that empty object means off. Thank you for that catch up! We’ve almost no users because we’re @ development phase, thank you for your help!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings