cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Question:
Is it possible to enable/disable a plugin with REST API?
Answer: 
Option 1
It is possible with the /api/plugins endpoint. Here is the script we use for a single enable/disable of a plugin;
For enabling set isEnabled to True 
For disabling set isEnabled to False

import requests
url = "URL/api/v1/plugins"
payload = "[{ \"name\": \"metadata\", \"lastUpdate\": \"2019-08-11T15:21:36.491Z\", \"version\": \"0\", \"isEnabled\": false, \"folderName\": \"metadata\"}]"
headers = {
'accept': "application/json",
'Content-Type': "application/json",
'cache-control': "no-cache",
'Authorization': 'Bearer  TOKEN'
}
response = requests.request("PATCH", url, data=payload, headers=headers)
print(response.text)

Option 2
You can also do this with PySense, a Python SDK for Sisense. 
pip install PySenseSDK
 
from PySense import PySense
py_client = PySense.PySense(<your server>, <your login>, <your password>)
my_plugin = py_client.get_plugins(search='MyPluginName')[0]
my_plugin.set_plugin_enabled(<True or False>)
Version history
Last update:
‎03-02-2023 08:46 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

Sisense Privacy Policy