# 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](/developers/understanding-varbase/varbase-recipes/varbase-seo-base.md) recipe). |

## Installation

Apply the recipe using Drush:

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.varbase.vardot.com/developers/understanding-varbase/varbase-recipes/varbase-api-base.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
