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

Update to Ablator API V3 #10

Open
winsmith opened this issue Aug 10, 2018 · 0 comments
Open

Update to Ablator API V3 #10

winsmith opened this issue Aug 10, 2018 · 0 comments

Comments

@winsmith
Copy link
Contributor

Changes in Brief

  • The V3 API has a unified URL scheme, which always accepts user identifier string and application ID before an actually API keyword.
  • Compared to V1, V3 returns a list of either Flavors or enabled Functionalities, so you can update all functionalities of your app at once
  • The which endpoint has been renamed to flavors
  • The V3 API also included the new Tagging API

API Definition

Caniuse

URL: https://<server_url>/api/v3/<client_user_string>/<app_id>/caniuse/

Returns a list of enabled functionalities of the specified app. Functionalities that are not enabled are not shown. You can use this API endpoint if you expect a functionality which is only switched on or off using ablator.

Example Return Value:

[
    "masa.rover.atmospheric-regulator",
    "masa.rover.space-heater"
]

Flavors

URL: https://<server_url>/api/v3/<client_user_string>/<app_id>/flavors/

Returns a list of enabled Flavors of the specified app. Flavors that are not enabled are not shown. Unlike Functionalities, Flavors represent a specific variant of a feature. If you use Flavors for A/B testing or something similar, this is where your data comes from.

Example Return Value:

[
    "masa.rover.atmospheric-regulator.power-save-mode",
    "masa.rover.dehumidifier.dry-as-bone"
]

Retrieving Tags

URL: https://<server_url>/api/v3/<client_user_string>/<app_id>/tag/

Returns a list of tags that are applied to the specified user. Tags allow you to segment and manage your user base, and enable or disable certain functionalities based on tags.

Example Return Value:

[
    {
        "name": "test2"
    },
    {
        "name": "test3"
    }
]

Adding Tags

URL: https://<server_url>/api/v3/<client_user_string>/<app_id>/tag/

POST a dictionary like { "name": "<tag_name>" } to this URL to add a new Tag to a user.

Removing Tags

URL: https://<server_url>/api/v3/<client_user_string>/<app_id>/tag/<tag_name>/remove/

Send a DELETE request to this URL to remove a Tag from the specified user.

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

No branches or pull requests

1 participant