Maintenance Admin API
Install a plugin from a URL
POST
/api/v1/plugins/install
Downloads the plugin's zip file, installs it, and activates it when asked. Only for an admin allowed to install plugins.
Request body application/x-www-form-urlencoded
url
string (uri)
required
Where to download the plugin's zip file.
overwrite
boolean
Replace the plugin if it is installed already.
Default:
0
activate
boolean
Activate it once installed.
Default:
0Responses
200
The plugin is installed.
400
The plugin could not be installed; the message says why.
401
The token is missing or wrong, or its admin may not install plugins.
422
url is missing.
Install a plugin from a URL
1
2
3
4
5
6
curl -X POST 'https://your-domain/api/v1/plugins/install' \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
--data-urlencode 'url=https://example.com/plugins/my-plugin-1.2.0.zip' \
--data-urlencode 'overwrite=0' \
--data-urlencode 'activate=1'
Response
{
"status": "success",
"plugin": {
"uid": "6af7d91f0e1c7",
"name": "vendor/my-plugin",
"title": "My plugin",
"version": "1.2.0",
"status": "active"
},
"source": "https://example.com/plugins/my-plugin-1.2.0.zip"
}