Ga naar hoofdinhoud

Plugins API

De Plugins API biedt endpoints voor het beheren van plugins in Joomla.

Base URL

/api/index.php/v1/plugins

Endpoints Overzicht

MethodeEndpointBeschrijving
GET/pluginsAlle 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

ParameterTypeBeschrijving
idintegerPlugin 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

VeldTypeBeschrijving
enabledintIngeschakeld (0=nee, 1=ja)
orderingintVolgorde binnen de groep
accessintToegangsniveau
paramsobjectPlugin 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:

FolderBeschrijving
authenticationAuthenticatie methodes
contentContent verwerking
editorsWYSIWYG editors
editors-xtdEditor knoppen
extensionExtensie events
filesystemBestandssysteem adapters
finderSmart Search indexers
installerInstallatie helpers
media-actionMedia verwerking
privacyAVG/GDPR compliance
quickiconDashboard snelkoppelingen
sampledataVoorbeelddata
systemSysteem events
taskScheduled tasks
userGebruiker events
webservicesAPI 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

ElementBeschrijving
cachePagina caching
debugDebug console
languagefilterMeertalige site routing
logLogging
redirectURL redirects
sefSEF URLs
logoutUitlog functionaliteit

Content Plugins

ElementBeschrijving
emailcloakE-mail adressen verbergen
loadmoduleModule in artikel laden
pagebreakArtikel paginering
pagenavigationVorige/volgende navigatie
voteArtikel stemmen

Authentication Plugins

ElementBeschrijving
joomlaStandaard Joomla login
ldapLDAP authenticatie
cookieCookie-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