Plugins REST interface
Get node plugins state
Retrieve the status of all plugins of a managed node in WombatOAM.
Definition
| GET /api/plugins/node/NODE_ID/plugin
|
Example request
| curl -v -X GET "http://10.211.55.14:8080/api/plugins/node/ \
298548c9-f5f8-464d-9a2c-07d494c3ecd4/plugin"
|
Example response
1
2
3
4
5
6
7
8
9
10
11
12 | {
"plugins":[
[{"plugin_name": "wombat_plugin_kernel"},
{"plugin_apps": "kernel"},
{"plugin_state": "on"}],
[{"plugin_name": "wombat_plugin_code_tracer"},
{"plugin_apps": "kernel"},
{"plugin_state": "off"}],
[...],
[...]
]
}
|
Arguments
Argument |
Description |
node ID |
Required. The identifier of the node from which to retrieve plugin state. |
Returns
An array of plugin objects. The plugin objects contain the plugin_name
,
the plugin_apps
, and the plugin_state
, which indicates whether a plugin
is switched on or off.
Set node all plugins state
Set the state of all plugins on a node to either on or off.
Definition
| PUT /api/plugins/node/NODE_ID/plugin
|
Example request
| curl -X PUT "http://10.211.55.14:8080/api/plugins/node/ \
298548c9-f5f8-464d-9a2c-07d494c3ecd4/plugin" \
-H "Content-Type: application/json" \
-d "{\"plugin_state\":\"on\"}"
|
Example response
1
2
3
4
5
6
7
8
9
10
11
12 | {
"plugins":[
[{"plugin_name": "wombat_plugin_kernel"},
{"plugin_apps": "kernel"},
{"plugin_state": "on"}],
[{"plugin_name": "wombat_plugin_code_tracer"},
{"plugin_apps": "kernel"},
{"plugin_state": "on"}],
[...],
[...]
]
}
|
Arguments
Argument |
Description |
node ID |
Required. The identifier of the node on which to set the plugin state. |
plugin_state |
Required. The intended plugin state (on or off ). |
Returns
An array of plugin objects. The plugin objects contain the plugin_name
,
the plugin_apps
, and the plugin_state
, which indicates whether a plugin
is switched on or off.
Set node plugin state
Set a specific node plugin state to either on or off.
Definition
| PUT /api/plugins/node/NODE_ID/plugin/PLUGIN_ID
|
Example request
| curl -X PUT "http://10.211.55.14:8080/api/plugins/node/ \
298548c9-f5f8-464d-9a2c-07d494c3ecd4/ \
plugin/wombat_plugin_code_tracer" \
-H "Content-Type: application/json" \
-d "{\"plugin_state\":\"off\"}"
|
Example response
| [
{"plugin_name": "wombat_plugin_code_tracer"},
{"plugin_apps": "kernel"},
{"plugin_state": "off"}
]
|
Arguments
Argument |
Description |
node ID |
Required. The identifier of the node on which to set the plugin state. |
plugin ID |
Required. The identifier of the plugin for which to set the state. |
plugin_state |
Required. The intended plugin state (on or off ). |
Returns
Updated details of the plugin, showing the new plugin state.