Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

api_plugins

No security coverage
View on drupal.org

Lightweight foundation for building API integrations in Drupal.

Core Philosophy

Don’t create a separate service for every third-party API. Define an API plugin with endpoint-specific configuration and use a single shared service for request execution, authentication, and error handling.

This module provides only the essentials for API integration:

  • Plugin discovery and management
  • HTTP request handling
  • Authentication management
  • Base classes for building custom API plugins

No UI. No forms. No fields. Just clean, reusable services for developers.

Installation

composer require drupal/api_plugins
drush en api_plugins

Basic Usage

Enable an integration module, for example:

drush en api_plugins_openai

Call an API endpoint via PHP:

$api_service = \Drupal::service('api_plugins.request');

// Call an API plugin
$result = $api_service->sendRequest('openai_chat_completions', [
  'prompt' => 'What is the capital city of Czechia?',
  'model' => 'gpt-4o-mini',
  'temperature' => 0.0,
]);

print_r($result);

Apify MCP Server Examples

The Apify MCP Server plugin provides access to major Apify tool categories:

  • actors – Actor discovery and management tools
  • docs – Documentation search tools
  • runs – Actor run information tools
  • storage – Dataset and key-value store tools
  • specific actors – e.g. apify/rag-web-browser, compass/crawler-google-places

List Available Tools

Enable the MCP plugin:

drush en api_plugins_mcp

Programmatically list tools:

$plugin_manager = \Drupal::service('plugin.manager.api_endpoint');
$plugin = $plugin_manager->createInstance('apify_mcp_server');

$response = $plugin->sendRequest([
  'method' => 'tools/list',
  'id' => 1,
]);

print_r($response);

Summary

API Plugins is designed for developers who want consistent, maintainable integrations with third-party APIs — without reinventing the wheel for every integration. Use it as a foundation for modules like api_plugins_openai, api_plugins_mcp, or your own custom API connectors.

Activity

Total releases
1
First release
Oct 2025
Latest release
5 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.x-dev Dev Oct 27, 2025