Warning message

Documentation is currently being migrated into the new system. Some pages might be temporarily missing, and some guides might appear empty. Thank you for your patience while we are improving Drupal.org documentation.

Drupal 8 APIs

Drupal 8 introduces many new APIs and keeps only some of the Drupal 7/6 API. This section details the APIs in Drupal 8.

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

For a crash course, but with some real depth, check out Understanding Drupal 8. It provides an overview of many of the key D8 APIs.

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

Authentication API

The Authentication API is new in Drupal 8.

Block API

Blocks API in Drupal 8

CKEditor API

The CKEditor API is new in Drupal 8.

Cache API

Documentation for Cache API in Drupal 8.

Configuration API

Configuration API in Drupal 8.

Entity API

Drupal 8 Entity API documentation.

Entity Validation API

Entity Validation API in Drupal 8.

Filter API

The Filter API is conceptually the same in Drupal 8 as it was in Drupal 7 and before. The major changes are:

Form API

Form API in Drupal 8.

JavaScript API

The available JavaScript libraries have changed a lot in Drupal 8. JavaScript files which .info files called in Drupal 7 are now referenced

Logging API

In Drupal 8 watchdog has been refactored to an OO, PSR-3 compatible framework.

Menu API

Menu API in Drupal 8.

Middleware API

Drupal 8 has a Middleware API that it adopted from the broader PHP community: http://stackphp.com/.

Migrate API

Migrate API in Drupal 8.

Plugin API

Plugin API in Drupal 8.

Quick Edit API

The Quick Edit API is new in Drupal 8. It is inspired, and in some parts functionally identical to the Drupal 7 Quick Edit module.

RESTful Web Services API

RESTful Web Services API in Drupal 8.

Render API

Render API in Drupal 8.

Responses in Drupal 8

Responses in Drupal 8

Routing system

Routing system in Drupal 8.

Serialization API

Serialization API in Drupal 8.

Services and dependency injection

Services and dependency injection in Drupal 8.

State API

The State API provides a place for developers to store information about the system's state. State information differs from configuration in

Text Editor API

The Text Editor API is new in Drupal 8. It is inspired, and in some parts functionally identical to the Drupal 7 Wysiwyg module.

Tour API

You can create step by step guides about the user interface for the Drupal 8 Tour module by adding a YAML document to your module's config

Translation API (Code text)

When you include text in code, and the text will be displayed in the Drupal user interface, it needs to be internationalized (prepared

Typed Data API

Typed Data API in Drupal 8.

Update API

Update API for Drupal 8 (hook_update_N() etc.)