Plugins API
De Plugins API biedt endpoints voor het beheren van plugins in Joomla.
Base URL
/api/index.php/v1/plugins
Endpoints Overzicht
| Methode | Endpoint | Beschrijving |
|---|---|---|
| GET | /plugins | Alle plugins ophalen |
| GET | /plugins/{id} | Specifieke plugin ophalen |
| PATCH | /plugins/{id} | Plugin bijwerken |
info
Plugins kunnen niet via de API aangemaakt of verwijderd worden. Installatie en verwijdering gebeurt via de Extension Manager.
Alle plugins ophalen
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": {}
}
}
]
}
Specifieke plugin ophalen
GET /api/index.php/v1/plugins/{id}
Parameters
| Parameter | Type | Beschrijving |
|---|---|---|
| id | integer | Plugin ID |
Voorbeeld
curl -X GET "https://jouwesite.nl/api/index.php/v1/plugins/1" \
-H "X-Joomla-Token: JOUW_API_TOKEN"
Plugin bijwerken
PATCH /api/index.php/v1/plugins/{id}
Request Body
{
"enabled": 1,
"ordering": 5,
"access": 1,
"params": {
"param_name": "value"
}
}
Bewerkbare velden
| Veld | Type | Beschrijving |
|---|---|---|
| enabled | int | Ingeschakeld (0=nee, 1=ja) |
| ordering | int | Volgorde binnen de groep |
| access | int | Toegangsniveau |
| params | object | Plugin specifieke parameters |
Voorbeeld: Plugin inschakelen
curl -X PATCH "https://jouwesite.nl/api/index.php/v1/plugins/1" \
-H "X-Joomla-Token: JOUW_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": 1
}'
Voorbeeld: Plugin uitschakelen
curl -X PATCH "https://jouwesite.nl/api/index.php/v1/plugins/1" \
-H "X-Joomla-Token: JOUW_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": 0
}'
Plugin Folders (Types)
Plugins zijn georganiseerd in folders/types:
| Folder | Beschrijving |
|---|---|
| authentication | Authenticatie methodes |
| content | Content verwerking |
| editors | WYSIWYG editors |
| editors-xtd | Editor knoppen |
| extension | Extensie events |
| filesystem | Bestandssysteem adapters |
| finder | Smart Search indexers |
| installer | Installatie helpers |
| media-action | Media verwerking |
| privacy | AVG/GDPR compliance |
| quickicon | Dashboard snelkoppelingen |
| sampledata | Voorbeelddata |
| system | Systeem events |
| task | Scheduled tasks |
| user | Gebruiker events |
| webservices | API routes |
Filtering
Op folder/type
GET /api/index.php/v1/plugins?filter[folder]=system
Op status (ingeschakeld)
GET /api/index.php/v1/plugins?filter[enabled]=1
Op element naam
GET /api/index.php/v1/plugins?filter[element]=cache
Zoeken
GET /api/index.php/v1/plugins?filter[search]=authentication
Veelgebruikte Plugins
System Plugins
| Element | Beschrijving |
|---|---|
| cache | Pagina caching |
| debug | Debug console |
| languagefilter | Meertalige site routing |
| log | Logging |
| redirect | URL redirects |
| sef | SEF URLs |
| logout | Uitlog functionaliteit |
Content Plugins
| Element | Beschrijving |
|---|---|
| emailcloak | E-mail adressen verbergen |
| loadmodule | Module in artikel laden |
| pagebreak | Artikel paginering |
| pagenavigation | Vorige/volgende navigatie |
| vote | Artikel stemmen |
Authentication Plugins
| Element | Beschrijving |
|---|---|
| joomla | Standaard Joomla login |
| ldap | LDAP authenticatie |
| cookie | Cookie-based authenticatie |
Plugin Parameters Bijwerken
Elke plugin heeft eigen parameters. Bekijk de plugin's XML manifest voor beschikbare opties.
Voorbeeld: System - SEF plugin configureren
curl -X PATCH "https://jouwesite.nl/api/index.php/v1/plugins/{sef_plugin_id}" \
-H "X-Joomla-Token: JOUW_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"params": {
"indexphp": 0,
"trailingslash": 0
}
}'
Plugin Volgorde
De volgorde bepaalt in welke volgorde plugins binnen dezelfde groep worden uitgevoerd.
Volgorde aanpassen
curl -X PATCH "https://jouwesite.nl/api/index.php/v1/plugins/1" \
-H "X-Joomla-Token: JOUW_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ordering": 1
}'
tip
Lagere nummers worden eerst uitgevoerd. Dit is belangrijk voor plugins die van elkaar afhankelijk zijn.
Voorbeeld: Alle system plugins ophalen
curl -X GET "https://jouwesite.nl/api/index.php/v1/plugins?filter[folder]=system" \
-H "X-Joomla-Token: JOUW_API_TOKEN"
Voorbeeld: Plugin status bulk wijzigen
<?php
/**
* Meerdere plugins tegelijk in/uitschakelen
*/
function togglePlugins($pluginIds, $enabled, $token) {
$baseUrl = 'https://jouwesite.nl/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 ? 'ingeschakeld' : 'uitgeschakeld') . "\n";
}
}
// Voorbeeld: schakel debug plugins uit voor productie
togglePlugins([5, 12, 18], 0, 'JOUW_API_TOKEN');
?>
Beveiligingswaarschuwing
Belangrijk
Wees voorzichtig met het uitschakelen van plugins, vooral:
- Authentication plugins - Kan inloggen onmogelijk maken
- System - SEF - Breekt URL routing
- System - Session - Verbreekt sessie management
- Webservices plugins - Kan API functionaliteit uitschakelen