Drupal APIs

Each version of Drupal introduces new APIs and keeps only some of the previous major versions’ APIs.

Before diving into the documentation below you might want to read the background and prerequisites, and the Creating custom modules guides, both of which explain some concepts and terminology that will be assumed knowledge in the API documentation here.

Finally, review the Drupal backwards compatibility policy for an explanation of what may change between minor versions of Drupal and what will remain stable.

Access policy API

How to use the access policy API to provide flexible access controls

AJAX API

Using the AJAX API to dynamically update forms/displays.

Authentication API

Documentation for Authentication API.

Batch API

Documentation for Batch API.

Block API

Documentation for Block API.

Cache API

Documentation for Cache API.

(deprecated) CKEditor 4 API (Drupal 8 and 9)

Documentation for the deprecated CKEditor 4 API in Drupal 8 and 9.

CKEditor 5 API

Documentation for CKEditor 5 API in Drupal 9.4+

Command-Line Interface (CLI) API

Documentation for the command-line interface (CLI) API in Drupal

Configuration API

Configuration API documentation.

Database API

Documentation for the Database API.

Entity API

Entity API documentation.

Filter API

Documentation for Filter API.

Form API

Drupal's Form API provides a unified way for authoring HTML input forms and handling form validation and submission.

HTMX

Adding interactivity to HTML elements and forms.

Icon API

Documentation for Icon API introduced in Drupal 11.1

JavaScript API

Drupal JavaScript API.

Layout API

Documentation for Layout API.

Logging API

Documentation for Logging API.

Menu API

Menu API.

Middleware API

Documentation for Middleware API.

Migrate API

The Migrate API provides services for migrating data from different sources to Drupal 9 (or later)

Plugin API

The Plugins API is used to extend Drupal and add new functionality, and allow modules to define new plugin types.

RESTful Web Services API

RESTful Web Services API in Drupal.

Render API

Render API.

Responses

Drupal represents the responses it sends as Symfony Response objects.

Routing system

Routing system

Runtime Assertions

A runtime assertion is a statement that is expected to always be true at the point in the code it appears at.

Serialization API

Serialization API.

Services and dependency injection

Services and dependency injection.

State API

Documentation for State API in Drupal.

Text Editor API

Documentation for Text Editor API.

Token API

Documentation for Token API.

Translation API (Code text)

Documentation for Translation API (Code text).

Typed Data API

The Typed Data API is a low level API that describes data based on a set of available types.

Update API

Update API (hook_update_N() etc.)

Guide maintainers

eojthebrave's picture