Search by

drupal / webapi_starter

Drupal-Infrastructure

The basic Drupal API site template: JSON:API served from /api with OAuth 2.0 and Swagger UI documentation, on the standard Drupal content model.

Package info

git.drupalcode.org/project/webapi_starter.git

Homepage

Issues

Type:drupal-recipe

pkg:composer/drupal/webapi_starter

Statistics

Installs: 0

Dependents: 1

Suggesters: 0

1.0.0 2026-09-18 17:33 UTC

This package is auto-updated.

Last update: 2026-09-18 18:14:05 UTC


README

The basic Drupal API site template.

A site template for the Webships installer. It keeps the standard Drupal content model and adds a documented API:

  • JSON:API served from /api, and read-only.
  • OAuth 2.0 with Simple OAuth and consumers, and HTTP Basic authentication.
  • OpenAPI documents for JSON:API and REST, rendered with Swagger UI at /api-docs.
  • The Drupal core administration theme for the back end and the front end.
  • Registration is closed: an administrator creates the accounts.

Everything comes from drupal.org.

Install

With the Webships Project template:

ddev composer create-project drupal/webships_project:^1.0
ddev drush si -y webships --account-name=webmaster installer_site_template_form.add_ons=webapi_starter

Or apply the recipe on an existing site:

ddev composer require drupal/webapi_starter
ddev drush recipe recipes/webapi_starter

Write operations

JSON:API is read-only, which is what the Drupal Security Team recommends. Turn write operations on at /admin/config/services/jsonapi only when the site needs them, and rebuild the cache afterwards.

Cross-origin requests

CORS lives in sites/default/services.yml under cors.config. No module or recipe can ship it, so set it per site.