Plugins API
The Plugins API provides endpoints for managing plugins in Joomla.
Base URL
/api/index.php/v1/plugins
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /plugins | Retrieve all plugins |
| GET | /plugins/{id} | Retrieve specific plugin |
| PATCH | /plugins/{id} | Update plugin |
info
Plugins cannot be created or deleted via the API. Installation and removal is done through the Extension Manager.
Retrieve all plugins
GET /api/index.php/v1/plugins
Response
{
"data": [
{
"type": "plugins",
"id": "1",
"attributes": {
"name": "plg_authentication_joomla",
"type": "plugin",
"element": "joomla",
"folder": "authentication",
"enabled": 1,
"access": 1,
"ordering": 0,
"params": {}
}
}
]
}
Retrieve specific plugin
GET /api/index.php/v1/plugins/{id}
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | integer | Plugin ID |
Example
curl -X GET "https://yoursite.com/api/index.php/v1/plugins/1" \
-H "X-Joomla-Token: YOUR_API_TOKEN"
Update plugin
PATCH /api/index.php/v1/plugins/{id}
Request Body
{
"enabled": 1,
"ordering": 5,
"access": 1,
"params": {
"param_name": "value"
}
}
Editable fields
| Field | Type | Description |
|---|---|---|
| enabled | int | Enabled (0=no, 1=yes) |
| ordering | int | Order within the group |
| access | int | Access level |
| params | object | Plugin specific parameters |
Example: Enable plugin
curl -X PATCH "https://yoursite.com/api/index.php/v1/plugins/1" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": 1
}'
Example: Disable plugin
curl -X PATCH "https://yoursite.com/api/index.php/v1/plugins/1" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": 0
}'
Plugin Folders (Types)
Plugins are organized in folders/types:
| Folder | Description |
|---|---|
| authentication | Authentication methods |
| content | Content processing |
| editors | WYSIWYG editors |
| editors-xtd | Editor buttons |
| extension | Extension events |
| filesystem | Filesystem adapters |
| finder | Smart Search indexers |
| installer | Installation helpers |
| media-action | Media processing |
| privacy | GDPR compliance |
| quickicon | Dashboard quick icons |
| sampledata | Sample data |
| system | System events |
| task | Scheduled tasks |
| user | User events |
| webservices | API routes |
Filtering
By folder/type
GET /api/index.php/v1/plugins?filter[folder]=system
By status (enabled)
GET /api/index.php/v1/plugins?filter[enabled]=1
By element name
GET /api/index.php/v1/plugins?filter[element]=cache
Search
GET /api/index.php/v1/plugins?filter[search]=authentication
Common Plugins
System Plugins
| Element | Description |
|---|---|
| cache | Page caching |
| debug | Debug console |
| languagefilter | Multilingual site routing |
| log | Logging |
| redirect | URL redirects |
| sef | SEF URLs |
| logout | Logout functionality |
Content Plugins
| Element | Description |
|---|---|
| emailcloak | Hide email addresses |
| loadmodule | Load module in article |
| pagebreak | Article pagination |
| pagenavigation | Previous/next navigation |
| vote | Article voting |
Authentication Plugins
| Element | Description |
|---|---|
| joomla | Standard Joomla login |
| ldap | LDAP authentication |
| cookie | Cookie-based authentication |
Update Plugin Parameters
Each plugin has its own parameters. Check the plugin's XML manifest for available options.
Example: Configure System - SEF plugin
curl -X PATCH "https://yoursite.com/api/index.php/v1/plugins/{sef_plugin_id}" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"params": {
"indexphp": 0,
"trailingslash": 0
}
}'
Plugin Order
The order determines in which sequence plugins within the same group are executed.
Adjust order
curl -X PATCH "https://yoursite.com/api/index.php/v1/plugins/1" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ordering": 1
}'
tip
Lower numbers are executed first. This is important for plugins that depend on each other.
Example: Retrieve all system plugins
curl -X GET "https://yoursite.com/api/index.php/v1/plugins?filter[folder]=system" \
-H "X-Joomla-Token: YOUR_API_TOKEN"
Example: Bulk change plugin status
<?php
/**
* Enable/disable multiple plugins at once
*/
function togglePlugins($pluginIds, $enabled, $token) {
$baseUrl = 'https://yoursite.com/api/index.php/v1/plugins/';
foreach ($pluginIds as $id) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $baseUrl . $id);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-Joomla-Token: ' . $token,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'enabled' => $enabled
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo "Plugin {$id}: " . ($enabled ? 'enabled' : 'disabled') . "\n";
}
}
// Example: disable debug plugins for production
togglePlugins([5, 12, 18], 0, 'YOUR_API_TOKEN');
?>
Security Warning
Important
Be careful when disabling plugins, especially:
- Authentication plugins - Can make login impossible
- System - SEF - Breaks URL routing
- System - Session - Breaks session management
- Webservices plugins - Can disable API functionality