Example: Basic Code to use Python and Split REST API to add a Segment to treatment whitelist for given array of Split names within a given Workspace/Environment
- Python 2.7.15
- request 2.20.1
How to use:
- Class wrapper for Admin API is:
- Update your relevant Split Admin API Key, Environment Name, Workspace Name, Segment name in:
- Update the Splits names and treatment name in the dictionary (splits)
- The tool does not verify if the given segment name is added to the same traffic type and environment.
- The tool does verify if the treatment passed in the dictionary is valid and exist in the matching Split.