To initialize and start the SDK, just call the start() function of the Flagship class in the most appropriate location for your application.
def start(env_id, api_key, configuration=None)
from flagship import Flagship
Flagship.start('_YOUR_ENV_ID_', '_YOUR_API_KEY_')
Parameter
Required
Type
Description
env_id
Yes
str
Environment id provided by Flagship.
api_key
Yes
str
Api authentication key provided by Flagship.
configuration
No
DecisionApi / Bucketing (FLagshipConfig)
Flagship configuration (DecisionApi or Bucketing)
📘
Info
You can find your env_id and your api_key on your Flagship account, in Parameters > Environment & Security.
Configure your Python SDK
These classes aim to help you to configure the SDK via the following two available config implementations: DecisionApi and Bucketing.
DecisionApi (default)
Run the SDK in DecisionApi mode. The campaign assignments and targeting validation take place server-side. In this mode, each call to the fetchFlags method to refresh the flags will create an HTTP request.
from flagship import Flagship
from flagship.config import DecisionApi
Flagship.start('_YOUR_ENV_ID_', '_YOUR_API_KEY_', DecisionApi(
timeout=3000,
log_level=LogLevel.ALL,
status_listener=CustomStatusListener(),
log_manager=CustomLogManager()
))
Kwarg parameter
Type
Default
Description
timeout
int
2000
Specifies timeout for decision api requests in milliseconds
log_level
LogLevel
LogLevel.ALL
Specifies a log level to filter logs emitted by the SDK.
status_listener
StatusListener
None
Specifies a callback to be notified when the SDK status has changed.
log_manager
LogManager
FlagshipLogManager
Specifies a custom implementation of LogManager in order to receive logs from the SDK.
tracking_manager_config
TrackingManagerConfig
Default Tracking Manager Config
Specifies a custom tracking manager configuration. See TrackingManagerConfig section
cache_manager
CacheManager
None
Specifies a custom cache manager implementation. See CacheManager section
Bucketing
When the SDK is running in Bucketing mode, the SDK downloads all the campaigns configurations at once in a single bucketing file so that variation assignment can be computed client-side by the SDK. This bucketing file is stored in cache and will only be downloaded again when campaign configurations are modified in the Flagship interface.
from flagship import Flagship
from flagship.config import Bucketing
Flagship.start('_YOUR_ENV_ID_', '_YOUR_API_KEY_', Bucketing(
timeout=3000,
log_level=LogLevel.ALL,
status_listener=CustomStatusListener(),
polling_interval=2000,
log_manager=CustomLogManager()
))
Kwarg parameter
Type
Default
Description
timeout
int
2000ms
Specifies timeout for decision api requests in milliseconds
log_level
LogLevel
LogLevel.ALL
Specifies a log level to filter logs emitted by the SDK.
status_listener
StatusListener
None
Specifies a callback to be notified when the SDK status has changed.
log_manager
LogManager
FlagshipLogManager
Specifies a custom implementation of LogManager in order to receive logs from the SDK.
polling_interval
int
60000ms
Defines the time interval between two bucketing updates in milliseconds.
tracking_manager_config
TrackingManagerConfig
Default Tracking Manager Config
Specifies a custom tracking manager configuration. See TrackingManagerConfig section
cache_manager
CacheManager
None
Specifies a custom cache manager implementation. See CacheManager section
Create new visitors
The visitor instance is an helper object that lets you manage the context and campaigns for a visitor identified by a unique ID.
The visitor context is a property dataset that defines the current visitor of your app. This dataset is sent and used by the Flagship Decision API or the SDK as targeting criteria for campaign assignments.
For example, if you want to enable or disable a specific feature based on VIP status, you would pass this attribute as a key-value pair in the visitor context so that the Decision API can enable or disable the corresponding feature flag for the user.
This class specifies how Flagship SDK should handle the newly created visitor instance. See Visitor.Instance
authenticated
optional
Bool
False
Bool that Specifies if the visitor is authenticated (True) or anonymous (False). See Keep experience continuity
consent
optional
Bool
True
Bool that Specifies if the visitor has consented for personal data usage. When false some features will be deactivated, cache will be deactivated and cleared.
context
optional
Dict
Dict that specifies visitor initial context key / values used for targeting. Context keys must be String, and values types must be one of the following : Number, Boolean, String. See Managing visitor context
Visitor Instance
Visitor.Instance is an enum class that help you to define how the SDK should handle the visitor reference. There are two types:
Visitor.Intance
Description
SINGLE_INSTANCE
The newly created visitor instance will be returned and saved into the Flagship singleton. Call Flagship.getVisitor() to retrieve the instance. This option should be adopted on applications that handle only one visitor at the same time.
NEW_INSTANCE
The newly created visitor instance wont be saved and will simply be returned. Any previous visitor instance will have to be recreated. This option should be adopted on applications that handle multiple visitors at the same time.
Manage visitor consent
The Visitor class provides a method to let you manage visitor consent for data privacy usage. When False, campaign exposition and hits will be disabled and cache cleared until consent is passed True again.
def set_consent(self, consent)
visitor.set_consent(True)
Parameter
Required/optional
Type
Description
consent
Required
Bool
Specify if the visitor has consented for personal data usage. When false some features will be deactivated, cache will be deactivated and cleared.
🚧
Consent hits
Consent hit requests will still be enabled in order to clear server-side cached data.
Target visitors by updating its context
The user context is a property dataset that defines the current user of your app. This dataset is sent and used by the Flagship Decision API or by the SDK in Bucketing mode as targeting criteria for campaign assignment.
The following method from the visitor instance allows you to set new context values matching the given keys.
from flagship import Flagship, Visitor
#It is possible to pass initial context at visitor creation.
visitor = Flagship.new_visitor('your_visitor_unique_id', context={'vip':True})
#Later it is possible to update visitor context when you have more information.
last_purchase_info = {
'last_purchase_date':'07-04-2023',
'last_purchase_amount':99.9
}
visitor.update_context(last_purchase_info)
#Once the context is updated, you need to fetch the flags again so campaign assignments
# are also updated.
visitor.fetch_flags()
def update_context(self, context)
Parameter
Required/optional
Type
Description
context
Required
Tuple/Dict
Update the visitor context values, matching the given keys, used for targeting. A new context value associated with this key will be created if there is no previous matching value. Context keys must be Str, and values types must be one of the following : Number, Bool, Str.
🚧
Fetch flags
It is necessary to call fetch_flags() method after having the new context updated so campaigns will also be updated accordingly.
Predefined visitor context keys
The Flagship SDK contains predefined user context keys so the Flagship plateform will be able to recognize them.
You can overwrite these keys at any time, only the ones starting by 'FLAGSHIP' are reserved and cant be overridden.
All possible predefined keys are contained in the FlagshipContext enum class and are listed below:
Key
Type
Description
DEVICE_LOCALE
str
Define the current device locale in the visitor context. (must be a iso3 code str)
DEVICE_TYPE
DeviceType
Define the current device type in the visitor context.
DEVICE_MODEL
str
Define the current device model (Google Pixel 3) in the visitor context
LOCATION_CITY
str
Define the current city location in the visitor context.
LOCATION_REGION
str
Define the current region location in the visitor context.
LOCATION_COUNTRY
str
Define the current country location in the visitor context.
LOCATION_LAT
float
Define the current latitude location in the visitor context.
LOCATION_LONG
float
Define the current longitude location in the visitor context.
OS_NAME
str
Define the current OS name in the visitor context.
OS_VERSION
str
Define the current OS version name in the visitor context.
CARRIER_NAME
str
Define the current carrier name in the visitor context.
INTERNET_CONNECTION
str
Define the current connection type (ex Edge/3G/4G/5G/Wifi) in the visitor context.
APP_VERSION_NAME
str
Define the current app version in the visitor context.
APP_VERSION_CODE
int
Define the current app version in the visitor context.
INTERFACE_NAME
str
Define the current interface name or URL in the visitor context.
FLAGSHIP_CLIENT
str
Reserved by Flagship. Specifies the current client SDK stack.
FLAGSHIP_VERSION
str
Reserved by Flagship. Specifies the current version of the SDK.
Fetch flags
The fetch_flags() method of the visitor instance automatically updates the campaign assignments according to the current user context, retrieves applicable flags and store them in the visitor instance.
When the SDK is configured with the DecisionApi decision mode, flags will be fetched from the Flagship Decision API via an http request. When configured with Bucketing decision mode, flags will be fetched locally via de decision file.
def fetch_flags(self)
from flagship import Flagship, Visitor
visitor = Flagship.new_visitor('your_visitor_unique_id', context={'vip':true})
# Get the flags from assigned campaign that match the given visitor context.
visitor.fetch_flags()
Use your flags
Once the campaign has been assigned and fetched, all the flags are stored in the SDK. You can retrieve these flags using the following get_flag function from the Visitor instance:
def get_flag(self, key, default)
from flagship import Flagship, Visitor
visitor = Flagship.new_visitor('your_visitor_unique_id', context={'vip':True})
visitor.fetch_flags()
#At this point, flags are available in the visito instance.
flag = visitor.get_flag("vip_feature", False)
#Get the value current flag value.
flag_value = flag.value()
This function will return a flag object containing the current value returned by Flagship and the associated
campaign metadata. If the key is not found an empty Flag object with the default value will be returned.
Parameter
Type
Description
key
str
Flag key associated to the flag.
default
str | bool | Number | Dict | Array
Fallback value to us
Get Flags values
def value(self, user_exposed=True)
Returns the current value for this flag or the default value when:
The flag doesn't exist.
The the current value and default value types are different.
The flag exists from the reference variation and no value have been configured on the platform.
flag = visitor.get_flag("vip_feature", False)
#Get the value current flag value.
flag_value = flag.value()
if flag_value:
#display the feature for vip users.
Parameter
Type
Description
key
str
Flag key associated to the flag.
default
str | bool | Number | Dict | Array
Fallback value to use
Expose Flags to user
Flag expositions are used to calculate visits on your campaign reporting.
By default when the value() method is called, the SDK considers that the visitor have seen the effets of this Flag and automatically sends a hit event to our data collection.
If you plan to use the flag value later, passing False will allow you to report flag exposition manually via the visitor_exposed method whenever your visitor really see the effect of the flag.
def visitor_exposed(self)
flag = visitor.get_flag("vip_feature", False)
####
flag_value = flag.value() # Visitor exposition will automatically be reported.
if flag_value:
#display the feature for vip users.
####
flag_value = flag.value(False) # Visitor exposition won't automatically be reported.
# ...
if flag_value:
#display the feature for vip users.
flag.visitor_exposed() # Visitor exposition will only be reported at this point.
Check if a Flag exists
Call the exists()method to check if a Flag exists in the Flagship SDK. This will be useful when the default value is returned from the value() method to know it is due to the reference variation or because the Flag do not exists.
def exists(self)
This function will return:
False if the Flag do not exists in Flagship or the value type doesn't match the given default value type.
True otherwise.
Retrieve campaign metadata
You may need to send campaign IDs or variation IDs to a third party for reporting and/or analytics purposes. It is possible to retrieve campaigns metadata for a specific Flag.
This section helps you track your users and learn how to build hits in order to feed campaign goals. For more information about our measurement protocol, read our Universal Collect documentation.
There are 5 types of hits: Page, Screen, Transaction, Item and Event.
Every hits emitted by visitors are managed by a composant called TrackingManager which gather all the visitors hits in a pool, batch them and send them at regular time intervals or when the pool max size is reached.
The TrackingManager service aims to save bandwidth traffic usage with its batch processing, but also aims to prevent any data loss as it will try to re-send hits that have failed due to network issue or save them into cache when it is necessary.
There are five different types of Hits available:
Page
Screen
Transaction
Item
Event
Hits must all be built and sent with the send_hit function from the Visitor instance:
from flagship.hits import Page
visitor.send_hit(Page("https://docs.developers.flagship.io/"))
def send_hit(self, hit)
Send hits as objectives in your campaign reporting.
Parameter
Type
Description
hit
Hit
Hit to track
Page
This hit can be sent each time a visitor visits a web page, or a local page or in an embedded web view.
from flagship.hits import Page
visitor.send_hit(Page("https://docs.developers.flagship.io/"))
class Page(Hit)
Parameter
Type
Description
origin
String
Valid URL.
Screen
This hit can be sent each time a visitor arrives on an app interface.
from flagship.hits import Screen
visitor.send_hit(Screen("your_screen_name"))
class Screen(Hit)
Parameter
Type
Description
origin
String
Interface name.
Event
This hit can be used for
any event (e.g. Add To Cart click, newsletter subscription).
Set the local currency for all transaction currency values. Value should be a valid ISO 4217 currency code.
with_item_count()
item_nb
int
Set the number of items purchased.
with_payment_method()
payment
str
Indicate the payment method.
with_shipping_cost()
shipping
float
Specifies the total shipping cost of the transaction.
with_shipping_method()
shipping_method
str
Indicate the shipping method.
with_taxes()
taxes
float
Specifies the total tax of the transaction.
with_total_revenue()
revenue
float
Specifies the total revenue associated with the transaction. This value should include any shipping or tax costs.
with_coupon_code()
coupon
str
Set the coupon code associated with the transaction.
Item
This hit can be used to link an item with a transaction. It must be sent after the corresponding transaction hit.
class Item(Hit)
from flagship.hits import Item
visitor.send_hit(Item("#309830", "RTX4080", "#cg_rtx_40802023")
.with_item_category("hardware")
.with_item_quantity(1)
.with_price(1200.00))
Parameters
Type
Description
transaction_id
str
The unique transaction ID to link with this item
product_name
str
Name of the product.
product_sku
str
Product stock keeping unit.
Optional builder functions
Parameter
Type
Description
with_price()
price
float
Specifies the price for a single item / unit.
with_item_quantity()
item_quantity
int
Specifies the number of items purchased.
with_item_category()
category
str
Specifies the category which the item belongs to.
Hits common builder functions
Optional builder functions
Parameter
Type
Description
with_ip()
ip
str
The IP address of the user. This should be a valid IP address in IPv4 or IPv6 format. It will always be anonymized.
with_resolution(
witdh, height
int
Set the user's device resolution. \n :param width: width in pixels. Max length 10 Bytes. Min value 0. \n :param height: height in pixels. Max length 10 Bytes. Min value 0.
with_session_number()
number
int
Number of the current session for the current visitor.
with_locale()
locale
str
Set locale of the user's device. Max length 20 Bytes.
Tracking Manager configuration
TrackingManager gathers all the hits emitted by visitors in a pools before sending them into batches to our API to limit bandwidth usage. This composant is configurable at SDK start method, this will allow you to specify the frequency of sending batches and the max pool size so you can adapt it to your visitors and hit volumetry.
When a batch fail to be sent for example due to a network failure, all of the hits inside the failed batch will be added back into the pool for future iteration.
To prevent any data loss, configure a custom cache implementation, see CacheManager, in order for the TrackingManager to be able to cache the remaining Hits in the pool when your app close, and load them when it needs to try to send them again. The CachingStrategy will help you to specify at which frequency the cache will be updated.
from flagship import Flagship
from flagship.config import Bucketing
from flagship.tracking_manager import TrackingManagerConfig, CacheStrategy
Flagship.start('_YOUR_ENV_ID_', '_YOUR_API_KEY_', DecisionApi(
tracking_manager_config=TrackingManagerConfig,
max_pool_size=10,
time_interval=2000,
cache_strategy=CacheStrategy.PERIODIC_CACHING))
Kwarg parameter
Type
Default value
Description
max_pool_size
int
Default is 20
Define the minimum number of hits the pool must reach to automatically batch all hits in the pool and send it \n \nNote: \n- Having a very large max_pool_size can lead to performance issues
time_interval
int
10000 ms
Define a regular interval in milliseconds to trigger batch processing \n \nNote: \n- The process will batch all hits from the pool whether max_pool_size is reached or not.
cache_strategy
CacheStrategy
CONTINUOUS_CACHING | \nPERIODIC_CACHING
Define the strategy that will be used for hit caching. See \nCacheStrategy
Hits caching strategy
The CacheStrategy enum class specifies the hits caching strategy to adopt into the TrackingManager and relies on the HitCacheImplementation class that must be implemented in the CacheManager. Depending on the strategy the TrackingManager will request the CacheManager to CACHE, LOOK-UP or FLUSH hits from the linked database.
There are two available values for the CacheStrategy:
Key
Description
CONTINUOUS_CACHING
Hits will be continuously cached and flushed from the database. The database linked to the HitCacheImplementation class implemented in the provided CacheManager will be required each time time a hit is added or flushed from the TrackingManager pool.
PERIODIC_CACHING
Hits will be cached and flushed from the database periodically. The database linked to the HitCacheImplementation class implemented in the provided CacheManager will be required to cache/look-up/flush hits at regular time intervals. The time intervals relies on the TrackingManager 'time_interval' option.
Manage SDK Cache
At some points the Flagship SDK will require to cache and retrieve some information about visitors and hits.
Cached data will be used to:
Prevent re-allocation in bucketing mode if you have changed your traffic allocation in bucketing mode.
Handle Hits that failed to be sent due to network failure.
Be compatible with some features in Bucketing mode, like Dynamic allocation and Progressives Roll-out.
The Python SDK provides a way for you to customize where it will cache the needed data tanks to an interface to implement. You might want to pass your custom cache interface implementation to save and load data from an existing Redis or Memcached service.
📘
Sqlite implementation
The SDK already embeds a predefined Sqlite implementation to cache data locally but it is will only be suitable for services that handle one visitor at a time like python apps, scripts, IOT.
Customize cache manager
Set your custom cache implementation in the start method. See configuration :
from flagship import Flagship
from flagship.config import DecisionApi
from flagship.cache_manager import CacheManager, VisitorCacheImplementation, HitCacheImplementation
class CustomCacheManager(CacheManager, VisitorCacheImplementation, HitCacheImplementation):
def __init__(self):
super().__init__()
def open_database(self, env_id):
#Create or open your database
pass
def close_database(self):
#close your database
pass
async def cache_visitor(self, visitor_id, data):
#Upsert visitor information corresponding to the given id into your database here.
pass
async def lookup_visitor(self, visitor_id):
#Load and return visitor information corresponding to the given id from your database here.
pass
async def flush_visitor(self, visitor_id):
#Delete visitor information corresponding to the given id from your database here.
pass
def cache_hits(self, hits):
#Cache the given hits into your database here.
pass
async def lookup_hits(self):
#Load and return all the cached hits from your database here.
pass
def flush_hits(self, hits_ids):
#Delete hits corresponding to the given id from your database here.
pass
def flush_all_hits(self):
#Delete all the hits cached hits from your database here.
pass
Flagship.start(env_id, api_key, DecisionApi(cache_manager=CustomCacheManager())
There are two cache interfaces to implement:
Visitor cache interface
TheVisitorCacheImplementation class aims to provide an interface between the Flagship SDK and an existing database in order for the SDK to store visitors data. It defines the methods that will be called to handle the cache mechanism.
VisitorCacheImplementation
Cache visitor
This method is called when the Flagship SDK needs to save visitor's data into cache.
Identifier of the visitor whose data must be cached.
data
dict
Visitor's data to be cached.
Lookup visitor
This method is called when the Flagship SDK needs to load visitor's data from cache.
async def lookup_visitor(self, visitor_id: str)
Parameter
Type
Description
visitor_id
str
Identifier of the visitor whose cache must be loaded.
Flush visitor
This method is called when the Flagship SDK needs to flush visitor's data from cache.
async def flush_visitor(self, visitor_id: str)
Parameter
Type
Description
visitor_id
str
Identifier of the visitor whose cache must be flushed.
Hit cache interface
The HitCacheImplementation class aims to provide an interface between the Flagship SDK and an existing database in order to store hits data in case of error or network failure. It defines the methods that will be called by the SDK to handle the cache mechanism depending on the strategy.
HitCacheImplementation
Cache hits
This method is called when the Flagship SDK needs to save visitors hits into cache.
def cache_hits(self, hits)
Parameter
Type
Description
hits
dict
Dictionary of hits that need to be saved into cache.
Lookup hits
This method is called when the Flagship SDK needs to load visitors hits from the cache.
async def lookup_hits(self)
Flush hits
def flush_hits(self, hits_ids)
Parameter
Type
Description
hits_ids
dict
Hits ids that need to be flushed from cache.
Flush all hits
def flush_all_hits(self)
This method is called when the Flagship SDK needs to flush all the hits from cache.
Keep visitors experience continuity
Dealing with anonymous and logged-in users, experience continuity allows you to maintain consistency between sessions and devices. See Experience continuity concept and SDK implementation for more details.
🚧
Enable experience continuity feature
The use of this feature requires having the option enabled in your Flagship account beforehand. Select the desired environment and go to /settings/environment-settings and enable the "Experience Continuity" option.
Authenticate a visitor
There are 2 ways to authenticate a visitor and let the SDK knows that your visitor is authenticated:
Set the authenticated to True when creating a new visitor. See create new visitor.
Use authenticate() function of Visitor instance.
def authenticate(self, visitor_id)
This function will indicate to the SDK that the anonymous visitor is now authenticated, this will insure to keep the same experience.
visitor.authenticate("visitor_unique_id")
Parameter
Type
Description
visitor_id
str
Current authenticated visitor unique identifier.
🚧
Update visitor flags
Because the visitor have been now identified, it is required to call the fetch_flags()function of the visitor instance so his flags will be updated accordingly. See fetching flags.
Un-Authenticate a visitor
def unauthenticate(self)
visitor.unauthenticate()
This function will indicate to the SDK the authenticated visitor is now un-authenticated and back to anonymous.
🚧
Update visitor flags
Because the visitor have been now identified, it is required to call the fetch_flags()function of the visitor instance so his flags will be updated accordingly. See fetching flags.
Customize the logs of the SDK
The SDK provides a way for you to intercept and/or customize the logs emitted. It is possible to pass your own implementation of the LogManager class in the configuration.
The log_level option of the start method will filter the emitted logs.
from flagship import Flagship, LogLevel
from flagship.config import DecisionApi
from flagship.decision_mode import DecisionMode
from flagship.log_manager import LogManager, FlagshipLogManager
class CustomLogManager(LogManager):
def log(self, tag, level, message):
pass
def exception(self, exception, traceback):
pass
Flagship.start("_env_id_", "_api_key_", DecisionApi(
timeout=3000,
log_level=LogLevel.DEBUG,
status_listener=CustomStatusListener(),
polling_interval=2000,
log_manager=CustomLogManager()
))
Get the SDK status
The SDK can have different status states.
Updated 5 months ago
","html_footer":"","html_body":"","html_promo":"","javascript_hub2":"","javascript":"","stylesheet_hub2":"","stylesheet":"","favicon":["https://files.readme.io/f752ff2af794a60817f805643e50eca9b6ece82ecabce5e1330b94a00972e7cb-small-ABTasty_Marque_Yellow_small.png","f752ff2af794a60817f805643e50eca9b6ece82ecabce5e1330b94a00972e7cb-small-ABTasty_Marque_Yellow_small.png",35,32,"#d4fc04","https://files.readme.io/cb34f6c05c74f4a3266c28591a27fb0115bf92ba95d1472c85a3bfa877456a18-ABTasty_Marque_Yellow_small.png","66e21fb3ab0cd3000f012006"],"logo_white_use":true,"logo_white":["https://files.readme.io/d760334ef760b9850e03033ca3ee10065da4fc991edce662d0adabaaa502bf44-small-Logo.FER.White.Small.png","d760334ef760b9850e03033ca3ee10065da4fc991edce662d0adabaaa502bf44-small-Logo.FER.White.Small.png",523,80,"#ffffff","https://files.readme.io/6cf190bece7dc0371b785f67199f09f459b86ab7be06d734b43da8515bf73c31-Logo.FER.White.Small.png","66e21f7faad094004498a762"],"logo":["https://files.readme.io/924b6fced0177b97a2333057d92c722284e1fc5994d2a87ad98aab9e5d9222fe-small-Logo.FER.Blue.Small.png","924b6fced0177b97a2333057d92c722284e1fc5994d2a87ad98aab9e5d9222fe-small-Logo.FER.Blue.Small.png",523,80,"#dcdce4","https://files.readme.io/5bebeb29e71174ae8ef3ef721b54658f2fde9ed63b6c9b7a1ba5dee0adf17ce5-Logo.FER.Blue.Small.png","66e21f780960780069648645"],"promos":[{"extras":{"type":"buttons","buttonPrimary":"get-started","buttonSecondary":"docs"},"title":"Feature Experimentation & Rollouts - Developer Docs","text":"Welcome to the Feature Experimentation & Rollouts Developer Hub.\n\nFeature Experimentation & Rollouts is AB Tasty's dedicated product optimization platform for teams to manage, release, personalize, and experiment with features across all codebases, channels, and devices.\n\nWant access?\nCreate your free account now: https://www.flagship.io/sign-up/","_id":"5e4aa55643caba00730ba9be"}],"body":{"style":"none"},"header":{"img_pos":"tl","img_size":"auto","img":[],"style":"solid","linkStyle":"buttons"},"typography":{"tk_body":"","tk_headline":"","tk_key":"","typekit":false,"body":"Open+Sans:400:sans-serif","headline":"Open+Sans:400:sans-serif"},"colors":{"body_highlight":"#A3B902","header_text":"","main_alt":"","main":"#3100BE","highlight":"","custom_login_link_color":""},"main_body":{"type":"links"},"splitReferenceDocs":false,"childrenAsPills":false,"hide_logo":true,"sticky":false,"landing":true,"overlay":"circuits","theme":"solid","link_logo_to_url":false,"referenceLayout":"column","subheaderStyle":"dropdown","showMetricsInReference":true,"rdmd":{"callouts":{"useIconFont":false},"theme":{"background":"","border":"","markdownEdge":"","markdownFont":"","markdownFontSize":"","markdownLineHeight":"","markdownRadius":"","markdownText":"","markdownTitle":"","markdownTitleFont":"","mdCodeBackground":"","mdCodeFont":"","mdCodeRadius":"","mdCodeTabs":"","mdCodeText":"","tableEdges":"","tableHead":"","tableHeadText":"","tableRow":"","tableStripe":"","tableText":"","text":"","title":""}},"referenceSimpleMode":true,"stylesheet_hub3":"","loginLogo":[],"logo_large":true,"colorScheme":"system","changelog":{"layoutExpanded":false,"showAuthor":true,"showExactDate":false},"allowApiExplorerJsonEditor":false,"ai_dropdown":"enabled","ai_options":{"chatgpt":"enabled","claude":"enabled","clipboard":"enabled","view_as_markdown":"enabled","copilot":"enabled"},"showPageIcons":true},"custom_domain":"docs.developers.flagship.io","childrenProjects":[],"derivedPlan":"startup2018","description":"Learn about using Flagship, AB Tasty's Feature and Experimentation Management platform. Direct access to API reference and SDKs, how to's and developer guides.","isExternalSnippetActive":false,"error404":"","experiments":[],"first_page":"landing","flags":{"translation":false,"directGoogleToStableVersion":false,"disableAnonForum":false,"newApiExplorer":true,"newMarkdown":false,"newEditor":true,"hideGoogleAnalytics":false,"cookieAuthentication":false,"allowXFrame":false,"speedyRender":false,"correctnewlines":false,"swagger":false,"oauth":false,"migrationSwaggerRun":false,"migrationRun":false,"hub2":true,"enterprise":false,"allow_hub2":false,"alwaysShowDocPublishStatus":false,"newSearch":true,"tutorials":true,"useReactApp":true,"allowApiExplorerJsonEditor":false,"allowReferenceUpgrade":false,"dashReact":false,"graphql":false,"newMarkdownBetaProgram":true,"oldMarkdown":false,"rdmdCompatibilityMode":false,"singleProjectEnterprise":false,"staging":false,"metricsV2":true,"newEditorDash":true,"enableRealtimeExperiences":false,"reviewWorkflow":true,"star":false,"allowDarkMode":false,"forceDarkMode":false,"useReactGLP":false,"disablePasswordlessLogin":false,"personalizedDocs":false,"myDevelopers":false,"superHub":true,"developerDashboard":false,"allowReusableOTPs":false,"dashHomeRefresh":false,"owlbotAi":false,"apiV2":false,"git":{"read":false,"write":false},"superHubBeta":false,"dashQuickstart":false,"disableAutoTranslate":false,"customBlocks":false,"devDashHub":false,"disableSAMLScoping":false,"allowUnsafeCustomHtmlSuggestionsFromNonAdmins":false,"apiAccessRevoked":false,"passwordlessLogin":"default","disableSignups":false,"billingRedesignEnabled":true,"developerPortal":false,"mdx":true,"superHubDevelopment":false,"annualBillingEnabled":true,"devDashBillingRedesignEnabled":false,"enableOidc":false,"customComponents":true,"disableDiscussionSpamRecaptchaBypass":false,"developerViewUsersData":false,"changelogRssAlwaysPublic":false,"bidiSync":true,"superHubMigrationSelfServeFlow":true,"apiDesigner":false,"hideEnforceSSO":false,"localLLM":false,"superHubManageVersions":true,"gitSidebar":true,"superHubGlobalCustomBlocks":false,"childManagedBidi":false,"superHubBranches":false,"externalSdkSnippets":false,"migrationPreview":false,"requiresJQuery":false,"superHubPreview":false},"fullBaseUrl":"https://docs.developers.flagship.io/","git":{"migration":{"createRepository":{"start":"2025-01-14T11:26:59.981Z","end":"2025-01-14T11:27:00.758Z","status":"successful"},"transformation":{"end":"2025-01-14T11:27:02.464Z","start":"2025-01-14T11:27:01.196Z","status":"successful"},"migratingPages":{"end":"2025-01-14T11:27:04.793Z","start":"2025-01-14T11:27:02.496Z","status":"successful"},"enableSuperhub":{"start":"2025-01-14T12:28:05.135Z","status":"successful","end":"2025-01-14T12:28:05.135Z"}},"sync":{"linked_repository":{"id":"917183488","name":"readme.io","url":"https://github.com/flagship-io/readme.io","provider_type":"github","privacy":{"visibility":"private","private":true},"linked_at":"2025-01-15T14:17:06.678Z","linked_by":"55f0353fd58f9b1900acf993","connection":"6787c2b79038ee984c933bdc","full_name":"flagship-io/readme.io","error":{}},"installationRequest":{},"connections":[{"_id":"6787c2b79038ee984c933bdc","active":true,"created_at":"2025-01-15T14:14:13.000Z","installation_id":59615051,"owner":{"type":"Organization","id":80262559,"login":"flagship-io","site_admin":false},"provider_type":"github"}],"providers":[]}},"glossaryTerms":[{"_id":"611fb9eba0648a0018313b47","term":"KPI","definition":"Collect events and analysed through the KPIs feature inside your report. You can set all the KPIs you want to analysed in the first step of the use case creation."},{"_id":"611fb9fb3fc26b0204e56988","term":"flags","definition":"A flag is a variable present in your code that you want to act on with a specific value (Boolean, integer, string). That variable can also be called Dynamic Variable or Remote Variable.\nFlagship will be the remote for the feature behind the flag."},{"_id":"611fba1354861501f2a2872a","term":"Server SDK","definition":"A Server SDK is a library present in your server.\nIt manages several users at a time (thousands/billions)."},{"_id":"611fba4962a583002c503523","term":"Client SDK","definition":"A Client SDK is a library present in the code of the device (mobile, browser, IoT, ...) and serves only one user at a time.\nExample: An Android application would benefit from the Android SDK. That SDK is directly present inside the code of the application, on the device of the user. That's a client SDK. It also means that it serves only one user at a time."},{"_id":"611fba60c0d2f70241d2c0a0","term":"Environments","definition":"Each environment gives the customer the possibility to separate their features and experiments inside the platform: the ones which are already in production from the ones which have not been released yet and are still in QA."},{"_id":"611fba81210c990022e60eaa","term":"Panic Mode","definition":"The panic mode is a way to not display any modifications set up in Flagship anymore. It could be also used as a \"Code Freeze mode\""},{"_id":"611fbada60399d025030d6e1","term":"visitorId","definition":"The visitorId has to be unique for each user/visitor. Thanks to that ID, you can guarantee the same experience to each of your users every time."},{"_id":"611fbb5ebe6f91002b629916","term":"user context","definition":"It enables you to target your visitors/users. Each user has a context with some criteria."}],"graphqlSchema":"","gracePeriod":{"enabled":false,"endsAt":null},"shouldGateDash":false,"healthCheck":{"provider":"","settings":{}},"intercom_secure_emailonly":false,"intercom":"","is_active":true,"integrations":{"login":{}},"internal":"","jwtExpirationTime":0,"landing_bottom":[{"type":"text","alignment":"left","pageType":"Documentation","text":"> 📘 Nota bene:\n> \n> In all article, Flagship refers to the **AB Tasty - Feature Experimentation & Rollouts**\n> [Learn more](https://flagship.zendesk.com/hc/en-us/articles/7536827849628--Flagship-January-2023-Release-Notes-)","title":""},{"type":"docs","alignment":"left","pageType":"Documentation"},{"type":"html","alignment":"left"}],"mdxMigrationStatus":"rdmd","metrics":{"thumbsEnabled":true,"enabled":false,"monthlyLimit":0,"planLimit":1000000,"realtime":{"dashEnabled":false,"hubEnabled":false},"monthlyPurchaseLimit":0,"meteredBilling":{}},"modules":{"logs":false,"suggested_edits":true,"discuss":false,"changelog":false,"reference":true,"examples":false,"docs":true,"landing":true,"custompages":true,"tutorials":false,"graphql":false},"name":"Developer Docs | Flagship","nav_names":{"discuss":"","changelog":"","reference":"","docs":"","tutorials":"","recipes":""},"oauth_url":"","onboardingCompleted":{"documentation":true,"appearance":true,"api":true,"jwt":true,"logs":true,"domain":false,"metricsSDK":false},"owlbot":{"enabled":false,"isPaying":false,"customization":{"answerLength":"long","customTone":"","defaultAnswer":"","forbiddenWords":"","tone":"neutral"},"copilot":{"enabled":false,"hasBeenUsed":false,"installedCustomPage":""}},"owner":{"id":null,"email":null,"name":null},"plan":"startup2018","planOverride":null,"planSchedule":{"stripeScheduleId":null,"changeDate":null,"nextPlan":null},"planStatus":"active","planTrial":"startup2018","readmeScore":{"components":{"newDesign":{"enabled":true,"points":25},"reference":{"enabled":true,"points":50},"tryItNow":{"enabled":true,"points":35},"syncingOAS":{"enabled":true,"points":10},"customLogin":{"enabled":true,"points":25},"metrics":{"enabled":false,"points":40},"recipes":{"enabled":false,"points":15},"pageVoting":{"enabled":true,"points":1},"suggestedEdits":{"enabled":true,"points":10},"support":{"enabled":true,"points":5},"htmlLanding":{"enabled":true,"points":5},"guides":{"enabled":true,"points":10},"changelog":{"enabled":false,"points":5},"glossary":{"enabled":true,"points":1},"variables":{"enabled":true,"points":1},"integrations":{"enabled":true,"points":2}},"totalScore":180},"reCaptchaSiteKey":"","reference":{"alwaysUseDefaults":true,"defaultExpandResponseExample":false,"defaultExpandResponseSchema":false,"enableOAuthFlows":false},"seo":{"overwrite_title_tag":false},"stable":{"_id":"61127b93152a69007f6f75ee","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["61127b93152a69007f6f75ef","61127b93152a69007f6f75f0","61127b93152a69007f6f75f1","61167ebb4ffec7006c3bf3d7","617a75a9582fae0100031dcf","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","632320b7a3ed67005851f379","63232b9160ed7a04b14d59ef","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","6329b49ea2f170000f651b9b","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","63da3a3a8523cc0058debdad","6400b814e6b6dc036e36d32d","6596c2727559eb00478048a4"],"project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2021-08-10T13:13:55.093Z","__v":0,"updatedAt":"2024-01-04T14:36:34.707Z","pdfStatus":"","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]},"subdomain":"flagship","subpath":"","superHubWaitlist":false,"topnav":{"edited":true,"right":[{"type":"search"},{"type":"user","text":"User","url":"/login?redirect_uri=/docs/python-reference"}],"left":[{"type":"url","text":"Developer Documentation","url":"https://docs.developers.flagship.io/"}],"bottom":[]},"trial":{"trialEndsAt":"2020-03-17T14:38:14.358Z","trialDeadlineEnabled":true},"translate":{"languages":[],"project_name":"","org_name":"","key_public":"","show_widget":false,"provider":"transifex"},"url":"https://www.flagship.io","versions":[{"_id":"679a3cb2ab901b0012f0f9f2","version":"0.0.0-preprod","version_clean":"0.0.0-preprod","codename":"0.0.0-preprod","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":["679a3cb1ab901b0012f0f88b","679a3cb1ab901b0012f0f88c","679a3cb1ab901b0012f0f88d","679a3cb1ab901b0012f0f88e","679a3cb1ab901b0012f0f88f","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","679a3cb1ab901b0012f0f890","679a3cb1ab901b0012f0f891","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","679a3cb1ab901b0012f0f892","679a3cb1ab901b0012f0f893","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","679a3cb1ab901b0012f0f894","679a3cb1ab901b0012f0f895","679a3cb1ab901b0012f0f896"],"pdfStatus":"","project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2025-01-29T14:35:26.504Z","__v":0,"updatedAt":"2025-01-29T14:35:26.504Z","forked_from":"61127b93152a69007f6f75ee","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]},{"_id":"679ce7a096cdeb000f5423e3","version":"0.1.1-doc","version_clean":"0.1.1-doc","codename":"Flagship Reference","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":["679ce7a096cdeb000f54227c","679ce7a096cdeb000f54227d","679ce7a096cdeb000f54227e","679ce7a096cdeb000f54227f","679ce7a096cdeb000f542280","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","679ce7a096cdeb000f542281","679ce7a096cdeb000f542282","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","679ce7a096cdeb000f542283","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","679ce7a096cdeb000f542284","679ce7a096cdeb000f542285","679ce7a096cdeb000f542286","679ce7a096cdeb000f5423e5"],"pdfStatus":"","project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2025-01-31T15:09:19.440Z","__v":1,"updatedAt":"2025-01-31T15:09:52.432Z","forked_from":"61127b93152a69007f6f75ee","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]},{"_id":"6810d743b32a3c0011bc960e","version":"1.0-FixFlutter","version_clean":"1.0.0-FixFlutter","codename":"","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":[],"pdfStatus":"","source":"readme","forked_from":"61127b93152a69007f6f75ee","createdAt":"2025-04-29T13:42:27.003Z","project":"5e4aa55643caba00730ba9bd","apiRegistries":[{},{},{}],"releaseDate":"2025-04-29T13:42:27.004Z","updatedAt":"2025-04-29T13:42:27.003Z","__v":0},{"_id":"68024865817782003538000a","version":"1.0-codebase-analyzer-vscode-guide","version_clean":"1.0.0-codebase-analyzer-vscode-guide","codename":"","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":[],"pdfStatus":"","source":"readme","forked_from":"61127b93152a69007f6f75ee","createdAt":"2025-04-18T12:41:09.034Z","project":"5e4aa55643caba00730ba9bd","apiRegistries":[{},{},{}],"releaseDate":"2025-04-18T12:41:09.036Z","updatedAt":"2025-04-18T12:41:09.034Z","__v":0},{"_id":"67d9391510ba08004c38f4da","version":"1.0-flutter","version_clean":"1.0.0-flutter","codename":"","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":[],"pdfStatus":"","forked_from":"61127b93152a69007f6f75ee","createdAt":"2025-03-18T09:12:53.380Z","project":"5e4aa55643caba00730ba9bd","apiRegistries":[{},{},{}],"releaseDate":"2025-03-18T09:12:53.381Z","updatedAt":"2025-03-18T09:12:53.380Z","__v":0},{"_id":"67e6ffd0e78129003dc55824","version":"1.0-js-fix","version_clean":"1.0.0-js-fix","codename":"","is_stable":false,"is_beta":false,"is_hidden":true,"is_deprecated":false,"categories":[],"pdfStatus":"","source":"readme","forked_from":"61127b93152a69007f6f75ee","createdAt":"2025-03-28T20:00:16.414Z","project":"5e4aa55643caba00730ba9bd","apiRegistries":[{},{},{}],"releaseDate":"2025-03-28T20:00:16.416Z","updatedAt":"2025-03-28T20:00:16.414Z","__v":0},{"_id":"61127b93152a69007f6f75ee","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["61127b93152a69007f6f75ef","61127b93152a69007f6f75f0","61127b93152a69007f6f75f1","61167ebb4ffec7006c3bf3d7","617a75a9582fae0100031dcf","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","632320b7a3ed67005851f379","63232b9160ed7a04b14d59ef","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","6329b49ea2f170000f651b9b","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","63da3a3a8523cc0058debdad","6400b814e6b6dc036e36d32d","6596c2727559eb00478048a4"],"project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2021-08-10T13:13:55.093Z","__v":0,"updatedAt":"2024-01-04T14:36:34.707Z","pdfStatus":"","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]}],"variableDefaults":[{"source":"","_id":"6373cab5f93f9f125712b7fe","name":"apiurl","default":"https://decision.flagship.io/v2","type":""},{"source":"","_id":"611a8b3ccd1de0002364b7fb","name":"toto","default":"coucou","type":""},{"source":"security","_id":"64196db40dab86002d6afe1b","name":"Authorization","type":"apiKey","apiSetting":"632320b7a3ed67005851f378"}],"webhookEnabled":false,"isHubEditable":true},"projectStore":{"data":{"allow_crawlers":"disabled","canonical_url":null,"default_version":{"name":"1.0"},"description":"Learn about using Flagship, AB Tasty's Feature and Experimentation Management platform. Direct access to API reference and SDKs, how to's and developer guides.","git":{"connection":{"repository":{"full_name":"flagship-io/readme.io","name":"readme.io","provider_type":"github","url":"https://github.com/flagship-io/readme.io"},"organization":{"name":"flagship-io","provider_type":"github"},"status":"active"}},"glossary":[{"_id":"611fb9eba0648a0018313b47","term":"KPI","definition":"Collect events and analysed through the KPIs feature inside your report. You can set all the KPIs you want to analysed in the first step of the use case creation."},{"_id":"611fb9fb3fc26b0204e56988","term":"flags","definition":"A flag is a variable present in your code that you want to act on with a specific value (Boolean, integer, string). That variable can also be called Dynamic Variable or Remote Variable.\nFlagship will be the remote for the feature behind the flag."},{"_id":"611fba1354861501f2a2872a","term":"Server SDK","definition":"A Server SDK is a library present in your server.\nIt manages several users at a time (thousands/billions)."},{"_id":"611fba4962a583002c503523","term":"Client SDK","definition":"A Client SDK is a library present in the code of the device (mobile, browser, IoT, ...) and serves only one user at a time.\nExample: An Android application would benefit from the Android SDK. That SDK is directly present inside the code of the application, on the device of the user. That's a client SDK. It also means that it serves only one user at a time."},{"_id":"611fba60c0d2f70241d2c0a0","term":"Environments","definition":"Each environment gives the customer the possibility to separate their features and experiments inside the platform: the ones which are already in production from the ones which have not been released yet and are still in QA."},{"_id":"611fba81210c990022e60eaa","term":"Panic Mode","definition":"The panic mode is a way to not display any modifications set up in Flagship anymore. It could be also used as a \"Code Freeze mode\""},{"_id":"611fbada60399d025030d6e1","term":"visitorId","definition":"The visitorId has to be unique for each user/visitor. Thanks to that ID, you can guarantee the same experience to each of your users every time."},{"_id":"611fbb5ebe6f91002b629916","term":"user context","definition":"It enables you to target your visitors/users. Each user has a context with some criteria."}],"homepage_url":"https://www.flagship.io","id":"5e4aa55643caba00730ba9bd","name":"Developer Docs | Flagship","parent":null,"redirects":[],"sitemap":"disabled","llms_txt":"disabled","subdomain":"flagship","suggested_edits":"enabled","uri":"/projects/me","variable_defaults":[{"name":"apiurl","default":"https://decision.flagship.io/v2","source":"","type":"","id":"6373cab5f93f9f125712b7fe"},{"name":"toto","default":"coucou","source":"","type":"","id":"611a8b3ccd1de0002364b7fb"},{"name":"Authorization","source":"security","type":"apiKey","id":"64196db40dab86002d6afe1b"}],"webhooks":[],"api_designer":{"allow_editing":"enabled"},"custom_login":{"login_url":null,"logout_url":null},"features":{"mdx":"enabled"},"mcp":{},"onboarding_completed":{"api":true,"appearance":true,"documentation":true,"domain":false,"jwt":true,"logs":true,"metricsSDK":false},"pages":{"not_found":null},"privacy":{"openapi":"admin","password":null,"view":"public"},"refactored":{"status":"enabled","migrated":"successful"},"seo":{"overwrite_title_tag":"disabled"},"plan":{"type":"startup2018","grace_period":{"enabled":false,"end_date":null},"trial":{"expired":false,"end_date":"2020-03-17T14:38:14.358Z"}},"reference":{"api_sdk_snippets":"enabled","defaults":"always_use","json_editor":"disabled","oauth_flows":"disabled","request_history":"enabled","response_examples":"collapsed","response_schemas":"collapsed","sdk_snippets":{"external":"disabled"}},"health_check":{"provider":"none","settings":{"manual":{"status":"down","url":null},"statuspage":{"id":null}}},"integrations":{"aws":{"readme_webhook_login":{"region":null,"external_id":null,"role_arn":null,"usage_plan_id":null}},"bing":{"verify":null},"google":{"analytics":null,"site_verification":null},"heap":{"id":null},"koala":{"key":null},"localize":{"key":null},"postman":{"key":null,"client_id":null,"client_secret":null},"recaptcha":{"site_key":null,"secret_key":null},"segment":{"key":null,"domain":null},"speakeasy":{"key":null},"stainless":{"key":null,"name":null},"typekit":{"key":null},"zendesk":{"subdomain":null},"intercom":{"app_id":null,"secure_mode":{"key":null,"email_only":false}}},"permissions":{"appearance":{"private_label":"disabled","custom_code":{"css":"disabled","html":"disabled","js":"disabled"}}},"appearance":{"brand":{"primary_color":"#3100BE","link_color":"#A3B902","theme":"system"},"changelog":{"layout":"collapsed","show_author":true,"show_exact_date":false},"markdown":{"callouts":{"icon_font":"emojis"}},"table_of_contents":"enabled","whats_next_label":null,"footer":{"readme_logo":"hide"},"logo":{"size":"large","dark_mode":{"uri":"/images/66e21f7faad094004498a762","url":"https://files.readme.io/d760334ef760b9850e03033ca3ee10065da4fc991edce662d0adabaaa502bf44-small-Logo.FER.White.Small.png","name":"d760334ef760b9850e03033ca3ee10065da4fc991edce662d0adabaaa502bf44-small-Logo.FER.White.Small.png","width":523,"height":80,"color":"#ffffff","links":{"original_url":"https://files.readme.io/6cf190bece7dc0371b785f67199f09f459b86ab7be06d734b43da8515bf73c31-Logo.FER.White.Small.png"}},"main":{"uri":"/images/66e21f780960780069648645","url":"https://files.readme.io/924b6fced0177b97a2333057d92c722284e1fc5994d2a87ad98aab9e5d9222fe-small-Logo.FER.Blue.Small.png","name":"924b6fced0177b97a2333057d92c722284e1fc5994d2a87ad98aab9e5d9222fe-small-Logo.FER.Blue.Small.png","width":523,"height":80,"color":"#dcdce4","links":{"original_url":"https://files.readme.io/5bebeb29e71174ae8ef3ef721b54658f2fde9ed63b6c9b7a1ba5dee0adf17ce5-Logo.FER.Blue.Small.png"}},"favicon":{"uri":"/images/66e21fb3ab0cd3000f012006","url":"https://files.readme.io/f752ff2af794a60817f805643e50eca9b6ece82ecabce5e1330b94a00972e7cb-small-ABTasty_Marque_Yellow_small.png","name":"f752ff2af794a60817f805643e50eca9b6ece82ecabce5e1330b94a00972e7cb-small-ABTasty_Marque_Yellow_small.png","width":35,"height":32,"color":"#d4fc04","links":{"original_url":"https://files.readme.io/cb34f6c05c74f4a3266c28591a27fb0115bf92ba95d1472c85a3bfa877456a18-ABTasty_Marque_Yellow_small.png"}}},"custom_code":{"css":null,"js":null,"html":{"header":"","home_footer":null,"page_footer":null}},"header":{"type":"solid","gradient_color":null,"link_style":"buttons","overlay":{"fill":"auto","type":"circuits","position":"top-left","image":{"uri":null,"url":null,"name":null,"width":null,"height":null,"color":null,"links":{"original_url":null}}}},"ai":{"dropdown":"enabled","options":{"chatgpt":"enabled","claude":"enabled","clipboard":"enabled","copilot":"enabled","view_as_markdown":"enabled"}},"navigation":{"first_page":"landing_page","left":[{"type":"link_url","title":"Developer Documentation","url":"https://docs.developers.flagship.io/","custom_page":null}],"logo_link":"landing_page","page_icons":"enabled","right":[{"type":"search_box","title":null,"url":null,"custom_page":null},{"type":"user_controls","title":null,"url":null,"custom_page":null}],"sub_nav":[],"subheader_layout":"dropdown","version":"disabled","links":{"home":{"label":"Home","visibility":"enabled"},"graphql":{"label":"GraphQL","visibility":"disabled"},"guides":{"label":"Guides","alias":null,"visibility":"enabled"},"reference":{"label":"API Reference","alias":null,"visibility":"enabled"},"recipes":{"label":"Recipes","alias":null,"visibility":"disabled"},"changelog":{"label":"Changelog","alias":null,"visibility":"disabled"},"discussions":{"label":"Discussions","alias":null,"visibility":"disabled"}}}}}},"version":{"_id":"61127b93152a69007f6f75ee","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["61127b93152a69007f6f75ef","61127b93152a69007f6f75f0","61127b93152a69007f6f75f1","61167ebb4ffec7006c3bf3d7","617a75a9582fae0100031dcf","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","632320b7a3ed67005851f379","63232b9160ed7a04b14d59ef","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","6329b49ea2f170000f651b9b","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","63da3a3a8523cc0058debdad","6400b814e6b6dc036e36d32d","6596c2727559eb00478048a4"],"project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2021-08-10T13:13:55.093Z","__v":0,"updatedAt":"2024-01-04T14:36:34.707Z","pdfStatus":"","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]}},"is404":false,"isDetachedProductionSite":false,"lang":"en","langFull":"Default","reqUrl":"/docs/python-reference","version":{"_id":"61127b93152a69007f6f75ee","version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["61127b93152a69007f6f75ef","61127b93152a69007f6f75f0","61127b93152a69007f6f75f1","61167ebb4ffec7006c3bf3d7","617a75a9582fae0100031dcf","6266521a411bce0080258339","630c707cce745900524cc769","6310d692b9f5840027490f73","6310d6f1be9c8f0c90d7108d","6310d71126a47c0084480c31","6310d73268005608a5f88ae3","6310d76d64b05a009668621d","6310d7880db1780013144da0","63232099e50bcd003fba5830","632320b7a3ed67005851f379","63232b9160ed7a04b14d59ef","632330f66e1d9c0bbfdbde4d","632356b0a5217f0092efd148","63288e26fffa4100658b1fd7","6329b49ea2f170000f651b9b","6376bf2f127d99000316ffe7","63886d7f8c6237000fb18bd0","63886f1f2d3b0600333f932b","638f4793a84bf400948f699a","63ad6d5ceca94e0038f04840","63ad7013dd9ca6000f9cccca","63adbb18068308000f3dd078","63adbc370ceca3007f62d6dd","63adbfea6921f50035421fbf","63adc5c6238ed904f03ccdae","63b2eda7cd178800586136fc","63b3005c43e0a3073bb71707","63b3035419df1a01bc9c5d59","63b30c3419df1a01bc9cfe21","63b30c5bb27a5f001643f6c3","63b3f025231ccd006d0ce90c","63b3fc8c54e4910038edac11","63da3a3a8523cc0058debdad","6400b814e6b6dc036e36d32d","6596c2727559eb00478048a4"],"project":"5e4aa55643caba00730ba9bd","releaseDate":"2021-08-10T13:13:55.093Z","createdAt":"2021-08-10T13:13:55.093Z","__v":0,"updatedAt":"2024-01-04T14:36:34.707Z","pdfStatus":"","apiRegistries":[{"name":"flagship-decision-api","url":"esno3kl2ef2rau"},{"name":"flagship-remote-control-api","url":"499rumw19lfi0azbt"},{"name":"auth-server","url":"53z41l88y2kpj"}]},"gitVersion":{"base":null,"display_name":null,"name":"1.0","release_stage":"release","source":"readme","state":"current","updated_at":"2025-05-14T12:00:16.000Z","uri":"/branches/1.0","privacy":{"view":"default"}},"versions":{"total":7,"page":1,"per_page":100,"paging":{"next":null,"previous":null,"first":"/flagship/api-next/v2/branches?page=1&per_page=100","last":null},"data":[{"base":"1.0","display_name":"0.0.0-preprod","name":"0.0.0-preprod","release_stage":"release","source":"readme","state":"current","updated_at":"2025-01-29T16:01:34.974Z","uri":"/branches/0.0.0-preprod","privacy":{"view":"hidden"}},{"base":"1.0","display_name":"Flagship Reference","name":"0.1.1-doc","release_stage":"release","source":"readme","state":"current","updated_at":"2025-01-31T15:12:30.626Z","uri":"/branches/0.1.1-doc","privacy":{"view":"hidden"}},{"base":null,"display_name":null,"name":"1.0","release_stage":"release","source":"readme","state":"current","updated_at":"2025-05-14T12:00:17.066Z","uri":"/branches/1.0","privacy":{"view":"default"}},{"base":"1.0","display_name":null,"name":"1.0-flutter","release_stage":"release","source":"readme","state":"current","updated_at":"2025-04-07T10:21:28.603Z","uri":"/branches/1.0-flutter","privacy":{"view":"hidden"}},{"base":"1.0","display_name":null,"name":"1.0-js-fix","release_stage":"release","source":"readme","state":"current","updated_at":"2025-03-28T20:20:54.314Z","uri":"/branches/1.0-js-fix","privacy":{"view":"hidden"}},{"base":"1.0","display_name":null,"name":"1.0-codebase-analyzer-vscode-guide","release_stage":"release","source":"readme","state":"current","updated_at":"2025-04-18T12:43:24.020Z","uri":"/branches/1.0-codebase-analyzer-vscode-guide","privacy":{"view":"hidden"}},{"base":"1.0","display_name":null,"name":"1.0-FixFlutter","release_stage":"release","source":"readme","state":"current","updated_at":"2025-04-29T13:43:48.182Z","uri":"/branches/1.0-FixFlutter","privacy":{"view":"hidden"}}]}}">