Rest API - Update Plugin by Site ID and Plugin Slug

Hello - I’m having some issues with updating a specific plugin with the rest api… i can sync the sites, pull site information, it reports that this specific plugin has an update, but then no matter what i do, when i run to update that site-id & plugin, it reports that no plugin updates are available…

Update available for plugin ‘jet-blocks’.
Attempting to update all plugins on site ID 1
Status Code: 200
Response Text: {“success”:0,“message”:“No Plugins to update.”}

I’ve tried different plugins as well (i know jet-blocks is premium so i’ve tried elementor and others that ive found updates available for)… i’ve tried reinstalling mainwp entirely including the child plugins, etc… the updates run perfectly fine from the dashboard itself, but the api will always report the same thing.

here is a sample of what i am running.

import requests

# Trigger the update
url = "https://dashboard.webshockmedia.com/wp-json/mainwp/v2/updates/1/update/plugins/"
headers = {
    'Authorization': 'Bearer MY-API-KEY',
    'Content-Type': 'application/json'
}
data = {'slugs': ['jet-blocks']}
response = requests.post(url, headers=headers, json=data)
print(response.json())

Also i can use the same api key and format and it will successfully sync the websites as well as report all available updates with no problem… its JUST the update itself that fails every time.

Hey @bsjelin

Based on that sample, it seems that the plugin slugs are not correct.

For example, for Classic Editor, the slug should be classic-editor/classic-editor.php.
Also, the parameter should be slug instead of slugs.