Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebAPI Starter

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.

About

The basic default Drupal API site template. Mirror of https://www.drupal.org/project/webapi_starter

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors