UI usage
Global search
On the top of the screen you can quick search and access "features", "configurations", "experiments" or "global script".
The search can be refined by clicking the buttons:
Clicking one item will bring you to the edit page of the selected item.
Features
Visit to the features UI doc
Configurations
Visit to the configuration UI doc
Experiments (A/B testing)
Visit to the experiments UI doc
Scripts
You can write script once and reuse it between strategies. Just click to the Global Scripts
menu.
Create or update a script
Hit the Add item
or the pencil button to edit a script
When writing a script, you have access to
context
: A json object send by the clientenabled
: A function to call, the feature is enableddisabled
: A function to call, the feature is disabledhttp
: An http client that can be used to request an API.
The http client expose the call method that take two args :
options
, an object with the following possible attributesurl
(required): The url to call.method
(default get): The http method betwwenget
,post
,put
,delete
,option
,patch
headers
: A object with headerName -> Valuebody
: An optional json string
callback
: A bifunction with failure or success.
function enabled(context, enabled, disabled, http) {
http.call(
{
url: "http://localhost:9000/api/features/feature:with:script/check",
method: "post",
headers: {
"Izanami-Client-Id": "xxxx",
"Izanami-Client-Secret": "xxxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
user: context.user,
}),
},
function (error, success) {
if (error) {
return enabled();
} else {
var resp = JSON.parse(success);
if (resp.active) {
return enabled();
} else {
return disabled();
}
}
}
);
}
Web hooks
Like the other screen you can see the existing hooks on a table:
Manage web hooks
The registered hooks will be called when new events occur
Download and Upload
If you're admin you have the right to download or upload.
Manage users
You can manage user if you're an admin.
Like the other screen you can see the existing users on a table:
Edit a user
To create or edit a user, you have to
- an Id
- A name
- An email
- A password
- Specified if the user is admin
- Patterns to apply restriction on user
Download and Upload
If you're admin you have the right to download or upload.
Manage API keys
You can manage api keys if you're an admin.
Like the other screen you can see the existing api keys on a table:
Edit a api key
To create or edit a api key, you have to
- A name
- A client id
- A client secret
- Patterns to apply restriction on api key
Download and Upload
If you're admin you have the right to download or upload.