Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose JSON endpoint for Waffle flag/switch/sample state #452

Merged
merged 6 commits into from
Jul 23, 2022

Conversation

shaungallagher
Copy link
Contributor

@shaungallagher shaungallagher commented Jul 22, 2022

Why

Waffle currently has a view to expose flag/switch/sample state as a Javascript object via the WaffleJS endpoint.

But there are a number of use cases where it would be preferable to expose that state in a serialized format like JSON.

(Related Issue: #449)

What

Adds a JSON endpoint that returns the state of all flags/switches/samples.

In addition to the state, the endpoint also includes the last-modified time, which can be useful to identify stale flags that may need to be cleaned up.

Quality

Adds unit tests for the new waffle_status view.

Adds documentation about how to expose and query the endpoint.

Copy link
Collaborator

@clintonb clintonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks fine. Let me know your thoughts on the data format.

docs/usage/json.rst Outdated Show resolved Hide resolved
@clintonb clintonb merged commit 5d8f55c into jazzband:master Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants