Bucketed Variation via REST API
We’re working on a React application that is rendered on the server-side and I’m experimenting with integrating the Optimizely experiments on the application via code.
Thanks for posting your question here!
The REST API cannot be used to get information on a visitor's state, so you won't be able to get the details of the variation the user will be bucketed into via the REST API. There also isn't any way to know beforehand which variation a user will be bucketed into, since the bucketing is done at runtime, client-side.
You can execute JS API in the variation code/experiment code if you want to get and use this information after a visitor is bucketed. What are you looking to use the details of the variation of the user for?
we got a similar issue - we plan to render a React app on the server side and thought about using Optimizely as a feature flag system. Has anything changed since you replied to this question last year? Is it already possible to get variations for given user?
Thanks for your question - something has indeed changed since last year! We've launched our Full Stack product late 2016. One of its use cases is for expert web-implementations such as yours with React, and another is to use it for feature flags.
Please have a look at these different resources we have for our Full Stack product:
- Optimizely Full Stack Introduction
- Optimizely's Full Stack SDK's for developer
- Meet Optimizely X Full Stack Webinar
Does this sound like what you're looking for?