# Varbase API Base

The **Varbase API Base** recipe provides JSON:API with authentication, authorization, and OpenAPI documentation for building decoupled and headless applications with Varbase.

## Drupal.org Project

<https://www.drupal.org/project/varbase_api_base>

## Included Modules

Brings in the following core and contributed modules to your site:

| Module                                                                             | Purpose                                                         |
| ---------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| **JSON:API** *(in Drupal core)*                                                    | Exposes entities as a JSON:API-specification-compliant web API. |
| [**OpenAPI**](https://www.drupal.org/project/openapi)                              | Connects Drupal to the OpenAPI Javascript Library.              |
| [**OpenAPI JSON:API**](https://www.drupal.org/project/openapi_jsonapi)             | OpenAPI support for the JSON:API module.                        |
| [**OpenAPI REST**](https://www.drupal.org/project/openapi_rest)                    | OpenAPI support for the REST module.                            |
| [**ReDoc for OpenAPI UI**](https://www.drupal.org/project/openapi_ui_redoc)        | Provides display of OpenAPI docs using the ReDoc library.       |
| [**Swagger UI for OpenAPI UI**](https://www.drupal.org/project/openapi_ui_swagger) | Provides display of OpenAPI docs using the Swagger UI plugin.   |
| [**Simple OAuth & OpenID Connect**](https://www.drupal.org/project/simple_oauth)   | The OAuth 2.0 Authorization Framework.                          |
| [**REST UI**](https://www.drupal.org/project/restui)                               | Provides a user interface to manage REST resources.             |
| [**JSON:API Extras**](https://www.drupal.org/project/jsonapi_extras)               | Builds on top of JSON:API to deliver extra functionality.       |
| [**JSON:API Defaults**](https://www.drupal.org/project/jsonapi_extras)             | Builds on top of JSON API to deliver extra functionality.       |

## Available Modules (Not Enabled by Default)

The following modules are downloaded with this recipe but not enabled during installation. You can enable them manually if needed:

| Module                                                                  | Purpose                                                                                                                                                                                                                                                                                                               |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**Consumers**](https://www.drupal.org/project/consumers)               | Declare all the consumers of your API.                                                                                                                                                                                                                                                                                |
| [**Schema.org Metatag**](https://www.drupal.org/project/schema_metatag) | Base module for creating Schema.org JSON-LD structured data defined with Metatag module. Requires the [Metatag](https://www.drupal.org/project/metatag) module (provided by the [Varbase SEO Base](https://docs.varbase.vardot.com/11.0.x/developers/understanding-varbase/varbase-recipes/varbase-seo-base) recipe). |

## Installation

Apply the recipe using Drush:

```bash
ddev drush recipe ../recipes/varbase_api_base
```
