One of the main features of Switchr is accessing the feature flags through REST APIs.
For security purposes in order to get the feature flag value from api, a Token has to be generated and sent through the headers.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzYwNzI3MDQsIlVpZCI6IiIsIlR5cGUiOiJhcGktdG9rZW4iLCJFbWFpbCI6IiIsIlJvbGUiOjAsIldasdasI6ImRkNjFmOTlkLWU4MGEtNDhlYS04ODA2LWNmN2VjNmNjNTM5NyJ9.WGpNELEtE-RswhiGAdBBmHO3Yh1IyOW8ykMMRWiDj_E
GET https://dev-server.live:8020/api/get/<FLAG_NAME>
Assume, requesting a flag named "create_enable" with its value as "true"
curl -X GET http://localhost:8020/api/get/create_enable \
--header 'token:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzYwNzI3MDQsIlVpZCI6IiIsIlR5cGUiOiJhcGktdG9rZW4iLCdaskdjkasIiIsIlJvbGUiOjAsIlBpZCI6ImRkNjFmOTlkLWU4MGEtNDhlYS04ODA2LWNmN2VjNmNjNTM5NyJ9.WGpNELEtE-RswhiGAdBBmHO3Yh1IyOW8ykMMRWiDj_E'
{"flag":"true"}
{"message":"Record not found","success":false}