Closed frehner closed 5 years ago
From docs: https://github.com/CanopyTax/toggle-meister#list-of-all-current-endpoints
http :8445/api/envs/production/toggles
I think this will give you all of them? I know that canopy uses this API to populate the canopy-inspector's list of features.
I may be reading this wrong, but I believe that that endpoint falls under issue 2 in my list. It appears that I have to send the list of toggles I think? See line 23:
https://github.com/CanopyTax/toggle-meister/blob/master/tmeister/toggles.py
Ah you're right. I just checked in Canopy's app and they make two requests to populate the devtools:
GET /api/features
GET /api/toggles?feature=test_transcripts_extension&feature=tp_client_return_refactor&feature=tp_licenses&feature=irs_eservices_enabled&feature=sme_branching&feature=pastepocalypse&feature=new_transcripts&feature=canopy_letter_templates&feature=global_letter_generator&feature=lmgtfy&feature=client_transcripts&feature=zapier_integration&feature=task_on_time_entry&feature=self_serve_licenses&feature=access_levels_pm&feature=conversions&feature=efin&feature=notes_ui&feature=first_time_login&feature=source_form_search&feature=esign_pdf&feature=share_reminder&feature=mobile_upload_file&feature=custom_fields_multi_select_dropdown&feature=import_contacts_milestone_2&feature=import_contacts_milestone_3&feature=workspace_notes&feature=import_contacts_parcel&feature=credits_dashboard&feature=tasks_draggable&feature=redesign_efin_settings&feature=save_to_canopy_files&feature=php_to_python_endpoints&feature=payment_deposits&feature=amex_id&feature=tp_block_display&enrollment_id=584830&metrics=false
So yeah there is no API that does what you're asking for and the original issue stands.
Let's say
Those three issues could be resolved for me if there was a single endpoint that I could hit to get all toggles for an environment. As it stands, there are various workarounds but they all appear to have one or multiple of the above drawbacks.
Would there be any interest in allowing this API to exist?