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.
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_starterOr apply the recipe on an existing site:
ddev composer require drupal/webapi_starter
ddev drush recipe recipes/webapi_starterJSON: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.
CORS lives in sites/default/services.yml under cors.config. No module or
recipe can ship it, so set it per site.