If you want to view, activate, deactivate, or update the configuration of your custom API Server plugin using the Admin Console, add it to the Configuration > API Server page.
Edit <TOMCAT_HOME>/webapps/nnladmin/js/nnl/apiserver/apiserver_ui_config.json file.
Add a new property to the "api_server".<OBJECT_TYPE >."plugins" object in the JSON file, where <OBJECT_TYPE > is the type of your custom plugin: SessionPlugin, PolicyPlugin, TransactionPlugin or ExternalAuthenticationPlugin.
The key for your new property inside the "plugins" object is the fully qualified class name of your plugin class. The value of your new property is a JSON object with the following properties:
Property | Description |
|---|---|
label | Mandatory. The name that identifies the custom plugin on the Admin Console's Configuration > API Server page. |
configName | Optional. The name of the configuration object for your custom plugin. If specified, the Admin Console can retrieve the content of configName for the current tenantID and your plugin's objectType. The content of configName is then available for viewing or updating using the Admin Console. |
For example, if you have created a custom SessionPlugin with the class name "com.mycompany.plugins.MyPlugin", and a configuration object named "my_plugin_config", then the apiserver_ui_config.json file contains the following:
{
"api_server": {
...,
"SessionPlugin": {
...,
"plugins": {
...,
"com.mycompany.plugins.MyPlugin": {
"label": "My Plugin",
"configName": "my_plugin_config"
}
}
},
...
},
...
}After your custom plugin appears on the Admin Console's Configuration > API Server page and is active, you can change its execution order by dragging its label to the desired position in the list. See Important note under Session Plugins Main.