[Request] filtering of "/api/plugin/pluginmanager"? (giant file)

Hi there :slight_smile:

I'm using the OctoPrint pluginmanager's API to get a list of the current installed plugins, but the very same request loads all official plugins, which results in the request being about ~250 KB if you don't have any plugins installed yourself.

The request takes an average of 450 ms on the RPi's I have tested on (4 on good WiFi). This contributes heavily to the load time of OctoPrint, and in most cases the repository key of the response, containing all plugins don't get used for anything - it could be loaded once you open the "Get more plugins" modal, potentially?

The biggest issue in my case though, is that you can't get the plugins list, containing the plugins you have installed, without also getting 248 other plugins in the request, just slowing the entire process down.

Not a life-or-death critical issue, but something that would definitely help the load time of the OctoPrint client, and people using the API :smiley:

Depending on what you need, you may also look at the /api/settings endpoint. This includes a list of all plugins that have settings.

Unfortunately, he's trying to get a list of installed plugins, there display name, and version IIRC. All of that happens internally via an API call from PluginManager and seems to be only the place we've been able to find that shows that.

As @jneilliii says, my point was trying to get a list of all installed plugins - and "just" the ones with settings sadly doesn't cut it. Got them server-side using the injected _plugin_manager like this; self._plugin_manager.plugins, but I still think this request has a point. For pure non-plugin API-users, it'd still be a nice feature not having to get a lot of data you potentially don't want, and it wouldn't hurt the OctoPrint client either :slight_smile:

Looking at the code, it is not just that all plugins from the repository are included in the response, but that list also gets refreshed.

An additional /api/plugin/pluginmanager/installed endpoint returning only self._plugin_manager.plugins would be nice to have indeed.

1 Like

I too am interested in having this feature. I need to get information about a single plugin, but in order to do so I call /api/plugin/pluginmanager, which seems a little overkill for what i need.

I just created [Request] Add ability to filter /api/plugin/pluginmanager · Issue #4035 · OctoPrint/OctoPrint · GitHub to track this.