/plugins/{name}
0.2.19Unchanged since publicationEnable or disable a registered plugin
settingsallDisabling the plugin revokes all its API tokens, including the daemon's key and viewer tickets. UrbeStack removes its pages from the web interface navigation and nginx and stops running its hooks. Enabling the plugin restores its pages and hooks and writes a new daemon API key to its key file.
The API returns 400 if enabled is missing or name is invalid. A valid name is 2 to 32 characters long, starts with a lowercase ASCII letter, and contains only lowercase ASCII letters, digits, or hyphens. UrbeStack refuses requests for the plugin's current state.
Enabling requires the manifest at its registered path. If it is missing, run the vendor's installer again or remove the registration with urbestack-plugin-del --name NAME. If enabling the plugin would serve the first active plugin pages and the port is unavailable, set plugins.port to a free port in Settings or run urbestack-setting-set --key plugins.port --value N.
As a command
Run as root on the serverParameters
namepath ·PluginNameRequiredRequest body
JSON· 1 fieldenabledbooleanRequiredExample
See the API overview for how to set $API and $TOKEN.curl -sS -X PATCH "$API/plugins/alice" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true
}'200 OK{
"applied": {},
"key_file": "text",
"key_made": true,
"plugin": {
"disabled_at": "text",
"disabled_by": "text",
"enabled": true,
"files_present": true,
"health": "text",
"health_check": {
"answering": true,
"error": "Domain 'example.com' already exists",
"status": 1
},
"hook_files": [
"text"
],
"hook_timeout": 1,
"hooks": true,
"hooks_dir": "text",
"key_file": "text",
"key_made_at": "text",
"last_failure": "text",
"last_failure_at": "text",
"last_failure_op": "text",
"listen": "text",
"manifest_path": "text",
"name": "alice",
"packages_on": 1,
"packages_total": 1,
"pages": [
{
"icon": "text",
"panel": "admin",
"path": "public_html/index.php"
}
],
"panels": [
"text"
],
"registered_at": "text",
"requires": "text",
"scopes": [
"*"
],
"scopes_added": [
"text"
],
"title": {},
"updated_at": "text",
"upgraded_at": "text",
"upgraded_from": "text",
"user": "alice",
"vendor": "text",
"version": "0.0.1"
},
"revoked": 1
}Errors
4 errors, each a status and a sentence400--name is required400Invalid boolean400Nothing to change: enabled true or false401Authentication requiredurbestack.com/docs/api/patch-plugins-name/